RE: [PATCH RESEND] Input: omap-keypad: dynamically handle register offsets

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

 



On Tuesday, April 10, 2012 9:24 AM, Dmitry Torokhov wrote:
> On Tue, Apr 03, 2012 at 10:52:26AM +0530, Sourav Poddar wrote:
>> From: G, Manjunath Kondaiah <manjugk@xxxxxx>
>> 
>> Keypad controller register offsets are different for omap4
>> and omap5. Handle these offsets through static mapping and
>> assign these mappings during run time.
>> 
>
> In addition to Felipe's comments.
>
>> @@ -76,11 +81,66 @@ struct omap4_keypad {
>>  
>>  	unsigned int rows;
>>  	unsigned int cols;
>> +	unsigned int revision;
>> +	u32 irqstatus;
>> +	u32 irqenable;
>
>	u32 reg_offset;
>
> and you probably won't need revision field.
>
>>  	unsigned int row_shift;
>>  	unsigned char key_state[8];
>>  	unsigned short keymap[];
>>  };
>>  
>> +static int kbd_readl(struct omap4_keypad *keypad_data, u32 offset)
>> +{
>> +	if (keypad_data->revision == KBD_REVISION_OMAP4)
>> +		return __raw_readl(keypad_data->base + offset);

keypad_data->base is an ioremap'ed address. Shouldn't all the __raw_{read,write}l be
{read,write}l instead?

Regards,
Hartley

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


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux