Re: [PATCH 12/19] iio & mfd & input: ti_tscadc: Match mfd sub devices to regmap interface

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

 



What make you think I am the original author?

I just fixed whatever I had to fix to get it working.

Namely that the multi function device was using regmap in one place and
not in another, which had the nice effect of the regmap cache getting out of sync.

Regards

-- Pantelis

On Jun 4, 2013, at 1:52 PM, Sebastian Andrzej Siewior wrote:

> * Pantelis Antoniou | 2013-06-04 13:25:28 [+0300]:
> 
>>>>> diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
>>>>> index bd127bd..a27401a 100644
>>>>> --- a/drivers/mfd/ti_am335x_tscadc.c
>>>>> +++ b/drivers/mfd/ti_am335x_tscadc.c
>>>>> @@ -31,6 +31,7 @@ static unsigned int tscadc_readl(struct ti_tscadc_dev *tsadc, unsigned int reg)
>>>>> {
>>>>> 	unsigned int val;
>>>>> 
>>>> ????  What is this doing here? It's not doing the move to regmap but rather setting a default value.
>>> 
>>> No lo sé :) I saw that and was wondering myself a little and planned the
>>> romval of this default for later. Now I think I do this earlier.
>>> 
>> 
>> The tscadc_read function doesn't have a failure mode; doesn't return an error in case of a regmap_read
>> fail. Rather that change all the callers, we make sure we don't ever return an uninitialized value 
>> in case of an error (when val should be unchanged).
> 
> One stupid question: Why did you start using regmap in the first place?
> 
>>>>> +	val = (unsigned int)-1;
>>>>> 	regmap_read(tsadc->regmap_tscadc, reg, &val);
>>>>> 	return val;
>>>>> }
> 
> Sebastian

--
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