Loading drivers/slimbus/slim-msm-ngd.c +1 −0 Original line number Diff line number Diff line Loading @@ -1047,6 +1047,7 @@ static void ngd_laddr_lookup(struct work_struct *work) struct slim_controller *ctrl = &dev->ctrl; struct slim_device *sbdev; int i; slim_framer_booted(ctrl); mutex_lock(&ctrl->m_ctrl); list_for_each_entry(sbdev, &ctrl->devs, dev_list) { int ret = 0; Loading drivers/slimbus/slimbus.c +30 −0 Original line number Diff line number Diff line Loading @@ -637,6 +637,36 @@ void slim_report_absent(struct slim_device *sbdev) } EXPORT_SYMBOL(slim_report_absent); /* * slim_framer_booted: This function is called by controller after the active * framer has booted (using Bus Reset sequence, or after it has shutdown and has * come back up). Components, devices on the bus may be in undefined state, * and this function triggers their drivers to do the needful * to bring them back in Reset state so that they can acquire sync, report * present and be operational again. */ void slim_framer_booted(struct slim_controller *ctrl) { struct slim_device *sbdev; struct list_head *pos, *next; if (!ctrl) return; mutex_lock(&ctrl->m_ctrl); list_for_each_safe(pos, next, &ctrl->devs) { struct slim_driver *sbdrv; sbdev = list_entry(pos, struct slim_device, dev_list); mutex_unlock(&ctrl->m_ctrl); if (sbdev && sbdev->dev.driver) { sbdrv = to_slim_driver(sbdev->dev.driver); if (sbdrv->reset_device) sbdrv->reset_device(sbdev); } mutex_lock(&ctrl->m_ctrl); } mutex_unlock(&ctrl->m_ctrl); } EXPORT_SYMBOL(slim_framer_booted); /* * slim_msg_response: Deliver Message response received from a device to the * framework. Loading include/linux/slimbus/slimbus.h +15 −0 Original line number Diff line number Diff line Loading @@ -586,6 +586,9 @@ struct slim_controller { * @device_down: This callback is called when device reports absent, or the * bus goes down. Device will report present when bus is up and * device_up callback will be called again when that happens * @reset_device: This callback is called after framer is booted. * Driver should do the needful to reset the device, * so that device acquires sync and be operational. * @driver: Slimbus device drivers should initialize name and owner field of * this structure * @id_table: List of slimbus devices supported by this driver Loading @@ -600,6 +603,8 @@ struct slim_driver { int (*device_up)(struct slim_device *sldev); int (*device_down) (struct slim_device *sldev); int (*reset_device) (struct slim_device *sldev); struct device_driver driver; const struct slim_device_id *id_table; Loading Loading @@ -1035,6 +1040,16 @@ extern int slim_assign_laddr(struct slim_controller *ctrl, const u8 *e_addr, */ void slim_report_absent(struct slim_device *sbdev); /* * slim_framer_booted: This function is called by controller after the active * framer has booted (using Bus Reset sequence, or after it has shutdown and has * come back up). Components, devices on the bus may be in undefined state, * and this function triggers their drivers to do the needful * to bring them back in Reset state so that they can acquire sync, report * present and be operational again. */ void slim_framer_booted(struct slim_controller *ctrl); /* * slim_msg_response: Deliver Message response received from a device to the * framework. Loading Loading
drivers/slimbus/slim-msm-ngd.c +1 −0 Original line number Diff line number Diff line Loading @@ -1047,6 +1047,7 @@ static void ngd_laddr_lookup(struct work_struct *work) struct slim_controller *ctrl = &dev->ctrl; struct slim_device *sbdev; int i; slim_framer_booted(ctrl); mutex_lock(&ctrl->m_ctrl); list_for_each_entry(sbdev, &ctrl->devs, dev_list) { int ret = 0; Loading
drivers/slimbus/slimbus.c +30 −0 Original line number Diff line number Diff line Loading @@ -637,6 +637,36 @@ void slim_report_absent(struct slim_device *sbdev) } EXPORT_SYMBOL(slim_report_absent); /* * slim_framer_booted: This function is called by controller after the active * framer has booted (using Bus Reset sequence, or after it has shutdown and has * come back up). Components, devices on the bus may be in undefined state, * and this function triggers their drivers to do the needful * to bring them back in Reset state so that they can acquire sync, report * present and be operational again. */ void slim_framer_booted(struct slim_controller *ctrl) { struct slim_device *sbdev; struct list_head *pos, *next; if (!ctrl) return; mutex_lock(&ctrl->m_ctrl); list_for_each_safe(pos, next, &ctrl->devs) { struct slim_driver *sbdrv; sbdev = list_entry(pos, struct slim_device, dev_list); mutex_unlock(&ctrl->m_ctrl); if (sbdev && sbdev->dev.driver) { sbdrv = to_slim_driver(sbdev->dev.driver); if (sbdrv->reset_device) sbdrv->reset_device(sbdev); } mutex_lock(&ctrl->m_ctrl); } mutex_unlock(&ctrl->m_ctrl); } EXPORT_SYMBOL(slim_framer_booted); /* * slim_msg_response: Deliver Message response received from a device to the * framework. Loading
include/linux/slimbus/slimbus.h +15 −0 Original line number Diff line number Diff line Loading @@ -586,6 +586,9 @@ struct slim_controller { * @device_down: This callback is called when device reports absent, or the * bus goes down. Device will report present when bus is up and * device_up callback will be called again when that happens * @reset_device: This callback is called after framer is booted. * Driver should do the needful to reset the device, * so that device acquires sync and be operational. * @driver: Slimbus device drivers should initialize name and owner field of * this structure * @id_table: List of slimbus devices supported by this driver Loading @@ -600,6 +603,8 @@ struct slim_driver { int (*device_up)(struct slim_device *sldev); int (*device_down) (struct slim_device *sldev); int (*reset_device) (struct slim_device *sldev); struct device_driver driver; const struct slim_device_id *id_table; Loading Loading @@ -1035,6 +1040,16 @@ extern int slim_assign_laddr(struct slim_controller *ctrl, const u8 *e_addr, */ void slim_report_absent(struct slim_device *sbdev); /* * slim_framer_booted: This function is called by controller after the active * framer has booted (using Bus Reset sequence, or after it has shutdown and has * come back up). Components, devices on the bus may be in undefined state, * and this function triggers their drivers to do the needful * to bring them back in Reset state so that they can acquire sync, report * present and be operational again. */ void slim_framer_booted(struct slim_controller *ctrl); /* * slim_msg_response: Deliver Message response received from a device to the * framework. Loading