Re: [PATCH] gpio: twl4030: Correct status reporting when the GPIO is used as output

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

 



On 12/05/2012 11:48 PM, Grant Likely wrote:
>> -	base = REG_GPIODATAIN1 + d_bnk;
>> +	direction = gpio_twl4030_read(REG_GPIODATADIR1 + d_bnk);
>> +	if (direction > 0 && (direction >> d_off) & 0x1)
>> +		base = REG_SETGPIODATAOUT1 + d_bnk;
>> +	else
>> +		base = REG_GPIODATAIN1 + d_bnk;
>> +
> 
> This is probably quite expensive considering that reads need to go out
> the i2c bus. Things like the output state and the pin direction should
> be cached by the driver in its private data structure so that you don't
> add an additional i2c round trip.

True. I have sent the v2, which grown a bit since I did not wanted to add more
global variable to this driver.

-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux