Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf3e42cc authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: sdhci: Add new quirk for broken SDHCI LED control"

parents 1f7c1983 356bc5e8
Loading
Loading
Loading
Loading
+20 −15
Original line number Diff line number Diff line
@@ -1765,6 +1765,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
	WARN_ON(host->mrq != NULL);

#ifndef SDHCI_USE_LEDS_CLASS
	if (!(host->quirks2 & SDHCI_QUIRK2_BROKEN_LED_CONTROL))
		sdhci_activate_led(host);
#endif

@@ -2726,6 +2727,7 @@ static void sdhci_tasklet_finish(unsigned long param)
	host->auto_cmd_err_sts = 0;

#ifndef SDHCI_USE_LEDS_CLASS
	if (!(host->quirks2 & SDHCI_QUIRK2_BROKEN_LED_CONTROL))
		sdhci_deactivate_led(host);
#endif

@@ -4194,6 +4196,7 @@ int sdhci_add_host(struct sdhci_host *host)
#endif

#ifdef SDHCI_USE_LEDS_CLASS
	if (!(host->quirks2 & SDHCI_QUIRK2_BROKEN_LED_CONTROL)) {
		snprintf(host->led_name, sizeof(host->led_name),
			"%s::", mmc_hostname(mmc));
		host->led.name = host->led_name;
@@ -4207,6 +4210,7 @@ int sdhci_add_host(struct sdhci_host *host)
			       mmc_hostname(mmc), ret);
			goto reset;
		}
	}
#endif

	mmiowb();
@@ -4301,6 +4305,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead)
	mmc_remove_host(host->mmc);

#ifdef SDHCI_USE_LEDS_CLASS
	if (!(host->quirks2 & SDHCI_QUIRK2_BROKEN_LED_CONTROL))
		led_classdev_unregister(&host->led);
#endif

+2 −0
Original line number Diff line number Diff line
@@ -185,6 +185,8 @@ struct sdhci_host {
#define SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400		(1<<20)
/* Use reset workaround in case sdhci reset timeouts */
#define SDHCI_QUIRK2_USE_RESET_WORKAROUND		(1<<21)
/* Some controllers doesn't have have any LED control */
#define SDHCI_QUIRK2_BROKEN_LED_CONTROL			(1<<22)

	int irq;		/* Device IRQ */
	void __iomem *ioaddr;	/* Mapped address */