mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 05:03:52 +07:00
89168b4899
commit 98e90de99a
"mmc: host: switch OF parser to use gpio descriptors"
switched the semantic behaviour of card detect and read
only flags such that the inversion capability flag would
only be set if inversion was explicitly specified in the
device tree, in the hopes that no-one was using double
inversion.
It turns out that the XOR:ing between the explicit
inversion was indeed in use, so we need to restore the
old semantics where both ways of inversion are checked
and the end result XOR:ed.
Reported-by: Javier Martinez Canillas <javier@dowhile0.org>
Tested-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
/*
|
|
* Generic GPIO card-detect helper header
|
|
*
|
|
* Copyright (C) 2011, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef MMC_SLOT_GPIO_H
|
|
#define MMC_SLOT_GPIO_H
|
|
|
|
struct mmc_host;
|
|
|
|
int mmc_gpio_get_ro(struct mmc_host *host);
|
|
int mmc_gpio_request_ro(struct mmc_host *host, unsigned int gpio);
|
|
void mmc_gpio_free_ro(struct mmc_host *host);
|
|
|
|
int mmc_gpio_get_cd(struct mmc_host *host);
|
|
int mmc_gpio_request_cd(struct mmc_host *host, unsigned int gpio,
|
|
unsigned int debounce);
|
|
void mmc_gpio_free_cd(struct mmc_host *host);
|
|
|
|
int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
|
|
unsigned int idx, bool override_active_level,
|
|
unsigned int debounce, bool *gpio_invert);
|
|
int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,
|
|
unsigned int idx, bool override_active_level,
|
|
unsigned int debounce, bool *gpio_invert);
|
|
void mmc_gpiod_free_cd(struct mmc_host *host);
|
|
void mmc_gpiod_request_cd_irq(struct mmc_host *host);
|
|
|
|
#endif
|