greybus: arche-apb-ctrl: deassert reset at the end of probe
Now the complete handshaking between AP<=>SVC would be offloaded to parent driver (arche-platform) who is responsible for SVC control, so the apb-ctrl driver can just simply bring APB's out of reset during probe itself. Along with deasserting reset, this patch renames the local fn to exclusively use it for reset purpose. Note that, driver is exporting reset gpio to user, so user can still flash FW from prompt. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Tested-by: Michael Scott <michael.scott@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Родитель
33036178bf
Коммит
f1e9cbd5a0
|
@ -51,13 +51,13 @@ struct arche_apb_ctrl_drvdata {
|
|||
/*
|
||||
* Note that these low level api's are active high
|
||||
*/
|
||||
static inline void assert_gpio(unsigned int gpio)
|
||||
static inline void deassert_reset(unsigned int gpio)
|
||||
{
|
||||
gpio_set_value(gpio, 1);
|
||||
msleep(500);
|
||||
}
|
||||
|
||||
static inline void deassert_gpio(unsigned int gpio)
|
||||
static inline void assert_reset(unsigned int gpio)
|
||||
{
|
||||
gpio_set_value(gpio, 0);
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ static void apb_ctrl_cleanup(struct arche_apb_ctrl_drvdata *apb)
|
|||
regulator_disable(apb->vio);
|
||||
|
||||
/* As part of exit, put APB back in reset state */
|
||||
gpio_set_value(apb->resetn_gpio, 0);
|
||||
assert_reset(apb->resetn_gpio);
|
||||
apb->state = APB_STATE_OFF;
|
||||
|
||||
/* TODO: May have to send an event to SVC about this exit */
|
||||
|
@ -253,8 +253,9 @@ int arche_apb_ctrl_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
apb->state = APB_STATE_OFF;
|
||||
|
||||
/* deassert reset to APB : Active-low signal */
|
||||
deassert_reset(apb->resetn_gpio);
|
||||
apb->state = APB_STATE_ACTIVE;
|
||||
|
||||
platform_set_drvdata(pdev, apb);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче