Re: [PATCH 1/6] mmc: core: Add mmc_gpiod_set_cd_config() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 07, 2024 at 10:04:48PM +0200, Hans de Goede wrote:
> Some mmc host drivers may need to fixup a card-detection GPIO's config
> to e.g. enable the GPIO controllers builtin pull-up resistor on devices
> where the firmware description of the GPIO is broken (e.g. GpioInt with
> PullNone instead of PullUp in ACPI DSDT).
> 
> Since this is the exception rather then the rule adding a config
> parameter to mmc_gpiod_request_cd() seems undesirable, so instead
> add a new mmc_gpiod_set_cd_config() function. This is simply a wrapper
> to call gpiod_set_config() on the card-detect GPIO acquired through
> mmc_gpiod_request_cd().

...

>  int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
>  			 unsigned int idx, bool override_active_level,
>  			 unsigned int debounce);
> +int mmc_gpiod_set_cd_config(struct mmc_host *host, unsigned long config);

A nit, can we group it with...

>  int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,
>  			 unsigned int idx, unsigned int debounce);
>  void mmc_gpio_set_cd_isr(struct mmc_host *host,

...this one, as request ops vs. set_cd ones?

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux