qcacld-3.0: Implement uevent call back for snoc

Platform driver icnss can provide uevent notification like FW
ready & FW crashed. Register the call back for notification and
update driver state for FW crashed indication so that driver
doesn't have to wait for shutdown call back to know FW crashed.

CRs-fixed: 2004309
Change-Id: I48afe8e023107aba8362324e3adabf6d50996b67
This commit is contained in:
Prashanth Bhatta
2017-02-08 10:04:56 -08:00
zatwierdzone przez snandini
rodzic 9d8f469223
commit bd92f53484

Wyświetl plik

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -205,8 +205,7 @@ static int pld_snoc_suspend_noirq(struct device *dev)
return -EINVAL;
if (pld_context->ops->suspend_noirq)
return pld_context->ops->
suspend_noirq(dev, PLD_BUS_TYPE_SNOC);
return pld_context->ops->suspend_noirq(dev, PLD_BUS_TYPE_SNOC);
return 0;
}
@@ -231,8 +230,35 @@ static int pld_snoc_resume_noirq(struct device *dev)
return -EINVAL;
if (pld_context->ops->resume_noirq)
return pld_context->ops->
resume_noirq(dev, PLD_BUS_TYPE_SNOC);
return pld_context->ops->resume_noirq(dev, PLD_BUS_TYPE_SNOC);
return 0;
}
static int pld_snoc_uevent(struct device *dev,
struct icnss_uevent_data *uevent)
{
struct pld_context *pld_context;
uint32_t status;
pld_context = pld_get_global_context();
if (!pld_context)
return -EINVAL;
if (!pld_context->ops->update_status)
goto out;
switch (uevent->uevent) {
case ICNSS_UEVENT_FW_CRASHED:
status = PLD_RECOVERY;
break;
default:
goto out;
}
pld_context->ops->update_status(dev, status);
out:
return 0;
}
@@ -247,6 +273,7 @@ struct icnss_driver_ops pld_snoc_ops = {
.pm_resume = pld_snoc_pm_resume,
.suspend_noirq = pld_snoc_suspend_noirq,
.resume_noirq = pld_snoc_resume_noirq,
.uevent = pld_snoc_uevent,
};
/**