Re: Sparse GPIO maps with pinctrl-msm.c?

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

 



On 06/16/2017 11:35 AM, Bjorn Andersson wrote:

The npins here would allow us to properly name the multiple pins in e.g.
sdcX_data. But we're not doing this and I would be surprised if anyone
found it useful to get this in.
But how would that work?  Each group is a single TLMM block, which only 
has one bit for I/O.  You can't actually program more than one pin from 
a group.
struct msm_pingroup {
...
	unsigned in_bit:5;
	unsigned out_bit:5;

This only lets you define one bit for input, and one bit for output, for any group.
So it make sense to hardcode this value in msm_get_group_pins() and drop
it from the struct.
I might submit a patch for that later.

It's not an awesome solution for mobile either. But to solve this we
have two problems to solve;

1) as the XPU configuration isn't fixed we need to be dynamic or
configurable in some sensible way
I was planning on updating the TLMM ACPI node to include a property that
lists the acceptable GPIOs.

But this list is related to your XPU configuration and not the TLMM
block, so the list of enabled/disabled pins should not go in the driver.
It goes in the ACPI table, and the driver reads that, and then (ideally) 
creates an array of msm_pingroup objects that reflects the list in ACPI.
I'm hoping there's a way to modify msm_gpio_init() so that it parses the 
array, and looks for "unavilable" groups.  For example, if npins == 0, 
that would be one way to know that this group doesn't actually exist.
For example, instead of calling gpiochip_add_pin_range(), maybe it would 
call gpiochip_add_pingroup_range() instead.  Unfortunately, I just don't 
understand the gpiochip functions well enough to know what to do.  I 
need help in this area.
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux