[PATCH 1/5] drivers: w1: omap_hdq: cleanup and bug fixes.

sourav sourav.poddar at ti.com
Tue Apr 29 02:15:08 PDT 2014


Hi Paul,

On Tuesday 29 April 2014 12:49 AM, Paul Walmsley wrote:
> On Wed, 16 Apr 2014, Sourav Poddar wrote:
>
>> The patch adds the following to the omap hdq driver.
>> 1. HDQ Device reset call in probe.
>> 2. Enabling '1 wire mode' and checking for presence pulse bit.
>> 3. Proper disabling and enabling of interrupts during read path.
>> 4. Add re-initialization code during SKIP ROM command execution.
>> 5. Miscellaneous cleanup(formatting, return error checks).
>>
>> Signed-off-by: Sourav Poddar<sourav.poddar at ti.com>
>> ---
>>   drivers/w1/masters/omap_hdq.c |   85 ++++++++++++++++++++++++++++++++---------
>>   1 file changed, 68 insertions(+), 17 deletions(-)
>>
>> diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
>> index 9900e8e..0a7bf7f 100644
>> --- a/drivers/w1/masters/omap_hdq.c
>> +++ b/drivers/w1/masters/omap_hdq.c
> ...
>
>> @@ -115,6 +116,15 @@ static inline u8 hdq_reg_merge(struct hdq_data *hdq_data, u32 offset,
>>   	return new_val;
>>   }
>>
>> +static void hdq_disable_interrupt(struct hdq_data *hdq_data, u32 offset,
>> +				  u8 mask)
>> +{
>> +	u32 ie;
>> +
>> +	ie = readl(hdq_data->hdq_base + offset);
>> +	writel(ie&  mask, hdq_data->hdq_base + offset);
>> +}
>> +
> Does this function really need to take offset and mask arguments?  Won't
> they always be constant, and therefore, no need to pass them?

Yes, thats correct, they are always constant and can be used directly 
inside the
api. I will fix this in my next version.

>
> - Paul




More information about the linux-arm-kernel mailing list