[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <109a8453-2172-a2ee-8672-8efb489e3dd9@loongson.cn>
Date: Mon, 15 May 2023 20:01:17 +0800
From: zhuyinbo <zhuyinbo@...ngson.cn>
To: andy.shevchenko@...il.com
Cc: Mark Brown <broonie@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Jianmin Lv <lvjianmin@...ngson.cn>,
wanghongliang@...ngson.cn, Liu Peibao <liupeibao@...ngson.cn>,
loongson-kernel@...ts.loongnix.cn, zhuyinbo@...ngson.cn
Subject: Re: [PATCH v9 2/2] spi: loongson: add bus driver for the loongson spi
controller
在 2023/5/15 下午5:15, andy.shevchenko@...il.com 写道:
> Mon, May 15, 2023 at 04:14:00PM +0800, zhuyinbo kirjoitti:
>> 在 2023/5/11 下午3:18, zhuyinbo 写道:
>>> 在 2023/5/8 下午11:04, andy.shevchenko@...il.com 写道:
>
> ...
>
>>>>> +config SPI_LOONGSON_CORE
>>>>> + tristate "Loongson SPI Controller Core Driver Support"
>>>>
>>>> Does it need to be visible to the user?
>>
>> I try to set it invisible that by removing the SPI_LOONGSON_CORE Kconfig
>> or removing "tristate "Loongson SPI Controller Core Driver Support" that
>> will cause spi-core driver doesn't be compiled or compiled fail issue,
>> so I will still set it visible to the user.
>
> Making a symbol selectable only can be achieved by removing the description
> (near to tristate directive), have you tried that?
Is it like this ?
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -517,7 +517,7 @@ config SPI_LM70_LLP
a parallel port.
config SPI_LOONGSON_CORE
- tristate "Loongson SPI Controller Core Driver Support"
+ tristate
depends on LOONGARCH || COMPILE_TEST
Thanks.
>
> ...
>
>>>>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>>>> + if (res == NULL) {
>>>>
>>>> Why not using devm_platform_ioremap_resource()?
>>> okay, I will use it.
>>>>
>>>>> + dev_err(dev, "cannot get io resource memory\n");
>>>>> + return -ENOENT;
>>>>
>>>> return dev_err_probe();
>>
>> It seems that there is no need to print memory log when use
>> devm_platform_ioremap_resource because this function had contained
>> the this memory log print thus I will return PTR_ERR(reg_base).
>>
>> reg_base = devm_platform_ioremap_resource(pdev, 0);
>> if (IS_ERR(reg_base))
>> return PTR_ERR(reg_base);
>
> Good catch! Sure, go with this.
>
Powered by blists - more mailing lists