mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Chuanhong Guo <gch981213@gmail.com>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Qingfang Deng <qingfang.deng@siflower.com.cn>
Subject: Re: [PATCH 2/2] gpio: add support for GPIO controller on Siflower SoCs
Date: Wed, 1 Jan 2025 11:49:49 +0100	[thread overview]
Message-ID: <fce8205e-cde7-4bb6-903d-7b0620b46331@kernel.org> (raw)
In-Reply-To: <CAJsYDVJhPdPZY9OdCr9K27Q-2YPmi7TAC-fNB8Cn2vQpCzJBog@mail.gmail.com>

On 01/01/2025 10:11, Chuanhong Guo wrote:
> Hello Krzysztof!
> 
> On Tue, Dec 31, 2024 at 4:38 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On Wed, Dec 25, 2024 at 11:58:51AM +0800, Chuanhong Guo wrote:
>>> From: Qingfang Deng <qingfang.deng@siflower.com.cn>
>>>
>>> Add a driver for the GPIO controller on Siflower SoCs.
>>> This controller is found on all current Siflower MIPS and RISC-V
>>> chips including SF19A2890, SF21A6826 and SF21H8898.
>>>
>>> Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
>>> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
>>> ---
>>>  drivers/gpio/Kconfig         |   9 +
>>>  drivers/gpio/Makefile        |   1 +
>>>  drivers/gpio/gpio-siflower.c | 353 +++++++++++++++++++++++++++++++++++
>>>  3 files changed, 363 insertions(+)
>>>  create mode 100644 drivers/gpio/gpio-siflower.c
>>>
>>> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
>>> index add5ad29a673..fdc9a89ffbf3 100644
>>> --- a/drivers/gpio/Kconfig
>>> +++ b/drivers/gpio/Kconfig
>>> @@ -637,6 +637,15 @@ config GPIO_SIFIVE
>>>       help
>>>         Say yes here to support the GPIO device on SiFive SoCs.
>>>
>>> +config GPIO_SIFLOWER
>>> +     tristate "SiFlower GPIO support"
>>> +     depends on OF_GPIO
>>> +     depends on MIPS || RISCV || COMPILE_TEST
>>
>> This is supposed to be dependency on ARCH, not instruction set. I don't
>> se anything MIPS or RISCV here.
> 
> I haven't sent any arch patches yet. The SoCs basically work with
> MIPS/RISC-V generic kernel so I was planning to deal with it last with
> some device trees.
> Should I simply drop this dependency line for now, or should I add

This would work but OTOH it is also easy to forget to re-add it later.

> ARCH_xxx to arch/{mips,riscv}/Kconfig first?

But this is preferred. For me ARCH always comes first (or in parallel),
not the last. Why would we like to accept drivers which are not really
usable without the main parts?

> 
>>
>>> +     select GPIOLIB_IRQCHIP
>>> +     help
>>> +       GPIO controller driver for SiFlower MIPS and RISC-V SoCs
>>> +       including SF19A2890, SF21A6826 and SF21H8898.
>>
>> ...


> rm drivers/gpio/gpio-siflower.o && make ARCH=mips
> CROSS_COMPILE=mipsel-linux-gnu- W=1 drivers/gpio/gpio-siflower.o
>   CC      scripts/mod/empty.o
>   MKELF   scripts/mod/elfconfig.h
>   HOSTCC  scripts/mod/modpost.o
>   CC      scripts/mod/devicetable-offsets.s
>   HOSTCC  scripts/mod/file2alias.o
>   HOSTCC  scripts/mod/sumversion.o
>   HOSTCC  scripts/mod/symsearch.o
>   HOSTLD  scripts/mod/modpost
>   CC      kernel/bounds.s
>   CC      arch/mips/kernel/asm-offsets.s
>   CALL    scripts/checksyscalls.sh
>   CC      drivers/gpio/gpio-siflower.o
> 
>> Most of these commands (checks or W=1
>> build) can build specific targets, like some directory, to narrow the
>> scope to only your code. The code here looks like it needs a fix.
> 
> Would you mind sharing the warnings you found, and the command to
> reproduce those?

Cocci prints warning for the owner and based on owner presence I suspect
there could be more of patterns we fixed over last 10 years.

Best regards,
Krzysztof

      reply	other threads:[~2025-01-01 10:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-25  3:58 [PATCH 0/2] " Chuanhong Guo
2024-12-25  3:58 ` [PATCH 1/2] dt-bindings: gpio: add binding doc for siflower,sf19a2890-gpio Chuanhong Guo
2024-12-27 16:45   ` Linus Walleij
2024-12-29  3:06     ` Chuanhong Guo
2025-01-13 14:38       ` Linus Walleij
2024-12-25  3:58 ` [PATCH 2/2] gpio: add support for GPIO controller on Siflower SoCs Chuanhong Guo
2024-12-27 16:51   ` Linus Walleij
2024-12-29  3:09     ` Chuanhong Guo
2024-12-31  8:38   ` Krzysztof Kozlowski
2025-01-01  9:11     ` Chuanhong Guo
2025-01-01 10:49       ` Krzysztof Kozlowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fce8205e-cde7-4bb6-903d-7b0620b46331@kernel.org \
    --to=krzk@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gch981213@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=qingfang.deng@siflower.com.cn \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome