[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <26da9608-98f9-a679-2888-ce82093db2b1@loongson.cn>
Date: Wed, 23 Aug 2023 11:37:45 +0800
From: Yinbo Zhu <zhuyinbo@...ngson.cn>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Bartosz Golaszewski <brgl@...ev.pl>,
Conor Dooley <conor@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, linux-gpio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Jianmin Lv <lvjianmin@...ngson.cn>, wanghongliang@...ngson.cn,
loongson-kernel@...ts.loongnix.cn, zhuyinbo@...gson.cn
Subject: Re: [PATCH v3 1/2] gpio: dt-bindings: add parsing of loongson gpio
offset
在 2023/8/15 下午4:59, Linus Walleij 写道:
> On Mon, Aug 14, 2023 at 5:39 AM Yinbo Zhu <zhuyinbo@...ngson.cn> wrote:
>
>>> Why do you want to put it into device-tree so badly? This is not the
>>> first driver that would have of_match_data for different variants
>>> where you can have a structure that would keep offsets for different
>>> models. It's not like you will have hundreds of "compatible" chips
>>> anyway, most likely just a few?
>>
>> Using this ways that put offset property into device-tree that can be
>> compatible with future GPIO chips without the need to modify drivers,
>> such as more 2K chips in the future, but use of_match_data and data
>> field of_device_id, which every time a new SoC is released, the GPIO
>> driver needs to be modified once, which is not friendly to us.
>
> The purpose of device tree is to describe the hardware and
> to configure it for a target system.
>
> The purpose of device tree is not to make driver writing easy
> or convenient. It often does, but that is not the purpose.
>
> These offsets are not relevant to the people that need to
> author and maintain device trees to support and tailor their
> system. They are only relevant to driver authors and SoC
> manufacturers.
>
> What about just writing these offsets into the driver and use
> the compatible match to look them up.
>
okay, I got it, I had following your advice and send v4 to upstream,
please you help review it.
Thanks,
Yinbo
Powered by blists - more mailing lists