mmc: arm_pl180_mmci: Remove cd_inverted host's struct field
As platform uses GPIOs for card detection, it's simpler and more readable to use GPIO_ACTIVE_(LOW|HIGH) in the gpio flags instead of using the cd-inverted property. Reported-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
This commit is contained in:
parent
43d36a0bae
commit
fa91156165
2 changed files with 1 additions and 5 deletions
|
@ -499,11 +499,8 @@ static int dm_mmc_getcd(struct udevice *dev)
|
|||
struct pl180_mmc_host *host = dev->priv;
|
||||
int value = 1;
|
||||
|
||||
if (dm_gpio_is_valid(&host->cd_gpio)) {
|
||||
if (dm_gpio_is_valid(&host->cd_gpio))
|
||||
value = dm_gpio_get_value(&host->cd_gpio);
|
||||
if (host->cd_inverted)
|
||||
return !value;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
|
|
@ -192,7 +192,6 @@ struct pl180_mmc_host {
|
|||
struct mmc_config cfg;
|
||||
#ifdef CONFIG_DM_MMC
|
||||
struct gpio_desc cd_gpio;
|
||||
bool cd_inverted;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue