Re: [PATCH] gpio: Driver for SYSCON-based GPIOs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, Dec 12, 2013 at 8:20 PM, Alexander Shiyan <shc_work@xxxxxxx> wrote:
>> On Tue, Dec 10, 2013 at 4:26 PM, Alexander Shiyan <shc_work@xxxxxxx> wrote:

>> I take it that bit-offset can be say 1024 and bit count
>> 32 for a 32-bit register at syscon_base + 0x80?
>
> This can be represented in DT as (0x80 << 4).

That's better of course but you still have to read both the
device tree and the driver and correlate to figure out
what's going on.

>> I sort of like the syscon driver but I don't like the idea
>> of encoding register offsets into the device tree, even
>> less do I like the idea of encoding it in bit notation.
>
> I also have no idea how to present it differently.
> Can try to specify the byte offset through the "reg" property?
> The "bit-offset" will remain, but will point offset from the "reg" byte.

This does not help. I don't want the offset inside the
device tree at all.

>> I prefer that you put a header with all the offsets
>> into <linux/mfd/syscon-foo.h> and define all the
>> offsets there, then to reuse this driver with several
>> GPIO controllers all doing this GPIO-in-syscon
>> business, to #include <linux/mfd/syscon-bar.h>
>> etc and use the compatible string to figure out
>> which file to pick the offsets from.
>
> No headers is needed. Driver will be used in DTS only.

I am claiming it is needed because I don't want it to
be inside the DTS, I want it to be in the kernel.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux