[PATCH 27/38] iio: pressure-core: st: Give some indication if device probing was successful

Lars-Peter Clausen lars at metafoo.de
Wed Sep 11 03:18:59 EDT 2013


On 09/11/2013 09:10 AM, Lee Jones wrote:
> On Tue, 10 Sep 2013, Jonathan Cameron wrote:
>> Lee Jones <lee.jones at linaro.org> wrote:
>>> At the moment the driver is silent in some error cases and if
>>> successful.
>>> Prior to this patch there was no clear way to know if the driver
>>> succeeded
>>> or not without looking deep into sysfs.
>>>
>>> Signed-off-by: Lee Jones <lee.jones at linaro.org>
>>> ---
>>> drivers/iio/pressure/st_pressure_core.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/iio/pressure/st_pressure_core.c
>>> b/drivers/iio/pressure/st_pressure_core.c
>>> index 6ffd949..34b3fb1 100644
>>> --- a/drivers/iio/pressure/st_pressure_core.c
>>> +++ b/drivers/iio/pressure/st_pressure_core.c
>>> @@ -280,6 +280,9 @@ int st_press_common_probe(struct iio_dev
>>> *indio_dev,
>>> 	if (err && irq > 0)
>>> 		goto st_press_device_register_error;
>>>
>>> +	if (!err)
>>> +		dev_info(&indio_dev->dev, "Successfully registered\n");
>>> +
>> Not keen. That to my mind is pointless noise.
>
> I think it needs to be somewhere. IIO provides no indication whether
> these chips are probed/registered/whathaveyou, or even if the
> subsystem is in use.
>
> One line per hardware component is not noise, IMO it's indicative of
> key functionality which is now available:
>
> Bootlog:
> <snip>
> iio iio: lsm303dlh_accel: Successfully registered
> iio iio: l3g4200d_gyro: Successfully registered
> iio iio: lps001wp_press: Successfully registered
> iio iio: lsm303dlhc_magn: Successfully registered
> <snip>
>
>> If this made sense then it would be in the driver core not here.
>
> Also fine. Just anything but silence/NULL reporting.

Silence means everything is good, a message means there is an error. If every 
device that gets probed would spit out a message the log would be scrolling 
forever and you wouldn't be able to see the error messages.

- Lars




More information about the linux-arm-kernel mailing list