Re: [PATCH] i2c: core: helper function to detect slave mode

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

 



On Fri, Jan 6, 2017 at 7:46 PM, Luis Oliveira
<Luis.Oliveira@xxxxxxxxxxxx> wrote:
> On 06-Jan-17 17:17, Andy Shevchenko wrote:
>> On Fri, Jan 6, 2017 at 7:15 PM, Luis Oliveira
>> <Luis.Oliveira@xxxxxxxxxxxx> wrote:
>>> On 06-Jan-17 16:29, Andy Shevchenko wrote:
>>>> On Thu, Jan 5, 2017 at 7:24 PM, Luis Oliveira
>>
>>>> Please, add kernel doc description here, important thing is to explain
>>>> return codes in Return: section of it.
>>>>
>>>>> +int i2c_slave_mode_detect(struct device *dev)
>>
>> Just to make sure you didn't miss this one.
>>
>>
> Yes, I saw it. You were talking of something like this, right?
>
> /**
>  * i2c_slave_mode_detect - detect operation mode
>  * @dev:  The device owning the bus
>  *
>  * This checks the device nodes for a I2C slave by checking the address

a -> an

>  * used.
>  *

>  * Returns true if a I2C slave is detected, otherwise returns false.

It has int type and I would reword this accordingly.

Something like

 * Return:
 * 1 when an I2C slave is detected, 0 for I2C master mode,
 * and negative error otherwise.


>  */



-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux