[0/2] nvmem: qcom-spmi-sdam: fix module autoloading

Message ID 20230126133034.27491-1-johan+linaro@kernel.org
Headers
Series nvmem: qcom-spmi-sdam: fix module autoloading |

Message

Johan Hovold Jan. 26, 2023, 1:30 p.m. UTC
  The Qualcomm SDAM nvme driver did not have a module device table, which
prevents userspace from autoloading the driver when built as a module.

The driver was also being registered at subsys init time when built in
despite the fact that it can also be built as a module, which makes
little sense. There are currently no in-tree users of this driver and
there's no reason why we can't just let driver core sort out the probe
order.

Note that this driver will be used to implement support for the PMIC RTC
on Qualcomm platforms where the time registers are read-only (sic).

Johan


Johan Hovold (2):
  nvmem: qcom-spmi-sdam: fix module autoloading
  nvmem: qcom-spmi-sdam: register at device init time

 drivers/nvmem/qcom-spmi-sdam.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
  

Comments

Bjorn Andersson Jan. 26, 2023, 4:10 p.m. UTC | #1
On Thu, Jan 26, 2023 at 02:30:32PM +0100, Johan Hovold wrote:
> The Qualcomm SDAM nvme driver did not have a module device table, which
> prevents userspace from autoloading the driver when built as a module.
> 
> The driver was also being registered at subsys init time when built in
> despite the fact that it can also be built as a module, which makes
> little sense. There are currently no in-tree users of this driver and
> there's no reason why we can't just let driver core sort out the probe
> order.
> 
> Note that this driver will be used to implement support for the PMIC RTC
> on Qualcomm platforms where the time registers are read-only (sic).
> 
> Johan
> 

Reviewed-by: Bjorn Andersson <andersson@kernel.org>

> 
> Johan Hovold (2):
>   nvmem: qcom-spmi-sdam: fix module autoloading
>   nvmem: qcom-spmi-sdam: register at device init time
> 
>  drivers/nvmem/qcom-spmi-sdam.c | 14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> -- 
> 2.39.1
>
  
Srinivas Kandagatla Jan. 27, 2023, 9:30 a.m. UTC | #2
On 26/01/2023 13:30, Johan Hovold wrote:
> The Qualcomm SDAM nvme driver did not have a module device table, which
> prevents userspace from autoloading the driver when built as a module.
> 
> The driver was also being registered at subsys init time when built in
> despite the fact that it can also be built as a module, which makes
> little sense. There are currently no in-tree users of this driver and
> there's no reason why we can't just let driver core sort out the probe
> order.
> 
> Note that this driver will be used to implement support for the PMIC RTC
> on Qualcomm platforms where the time registers are read-only (sic).
> 
> Johan
> 


Applied thanks,

--srin

> 
> Johan Hovold (2):
>    nvmem: qcom-spmi-sdam: fix module autoloading
>    nvmem: qcom-spmi-sdam: register at device init time
> 
>   drivers/nvmem/qcom-spmi-sdam.c | 14 ++------------
>   1 file changed, 2 insertions(+), 12 deletions(-)
>