pinctrl: lpi: Avoid initial SSR notifications at bootup
In pinctrl LPI driver, avoid initial bootup SSR notifications after registration of SSR notifier. CRs-Fixed: 2017639 Change-Id: Ib634ae0efe903b6628dcb6a385f823b11a355973 Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:
parent
fec225ae45
commit
54ed63847a
1 changed files with 6 additions and 0 deletions
|
@ -408,13 +408,19 @@ static void lpi_gpio_set(struct gpio_chip *chip, unsigned pin, int value)
|
||||||
static int lpi_notifier_service_cb(struct notifier_block *this,
|
static int lpi_notifier_service_cb(struct notifier_block *this,
|
||||||
unsigned long opcode, void *ptr)
|
unsigned long opcode, void *ptr)
|
||||||
{
|
{
|
||||||
|
static bool initial_boot = true;
|
||||||
|
|
||||||
pr_debug("%s: Service opcode 0x%lx\n", __func__, opcode);
|
pr_debug("%s: Service opcode 0x%lx\n", __func__, opcode);
|
||||||
|
|
||||||
switch (opcode) {
|
switch (opcode) {
|
||||||
case AUDIO_NOTIFIER_SERVICE_DOWN:
|
case AUDIO_NOTIFIER_SERVICE_DOWN:
|
||||||
|
if (initial_boot)
|
||||||
|
break;
|
||||||
lpi_dev_up = false;
|
lpi_dev_up = false;
|
||||||
break;
|
break;
|
||||||
case AUDIO_NOTIFIER_SERVICE_UP:
|
case AUDIO_NOTIFIER_SERVICE_UP:
|
||||||
|
if (initial_boot)
|
||||||
|
initial_boot = false;
|
||||||
lpi_dev_up = true;
|
lpi_dev_up = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue