lkml.org 
[lkml]   [2017]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] spi: Add ADI driver for Spreadtrum platform
Hi Mark,

On 6 September 2017 at 23:04, Mark Brown <broonie@kernel.org> wrote:
> On Wed, Sep 06, 2017 at 02:10:44PM +0800, Baolin Wang wrote:
>
> This looks like a nice, clean driver. A few fairly small issues though:
>
>> +config SPI_SPRD_ADI
>> + tristate "Spreadtrum ADI controller"
>> + depends on ARCH_SPRD
>> + help
>> + ADI driver based on SPI for Spreadtrum SoCs.
>> +
>
> I can't see any hard dependencies on the architecture - can you add an
> || COMPILE_TEST for more coverage?

Yes.

>
>> + ret = devm_spi_register_controller(&pdev->dev, ctlr);
>> + if (ret) {
>> + dev_err(&pdev->dev, "failed to register SPI controller\n");
>> + goto free_hwlock;
>> + }
>
>> + spi_controller_put(ctlr);
>
> You used devm_ to register the controller, no need to free it
> explicitly.

Indeed.

>
>> +static int __init sprd_adi_init(void)
>> +{
>> + return platform_driver_register(&sprd_adi_driver);
>> +}
>> +subsys_initcall(sprd_adi_init);
>
> Why is this subsys_initcall() and not module_platform_driver()?

Since ADI is one very fundamental driver for our SoC, many drivers
such as regulator need depend on ADI, and regulator need to regulate
core voltage as earlier as possible.
Very appreciated for your comments.

--
Baolin.wang
Best Regards

\
 
 \ /
  Last update: 2017-09-07 05:13    [W:0.279 / U:2.184 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site