From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755364AbdAFVcX (ORCPT ); Fri, 6 Jan 2017 16:32:23 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:34626 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753232AbdAFVcO (ORCPT ); Fri, 6 Jan 2017 16:32:14 -0500 MIME-Version: 1.0 In-Reply-To: References: <475d9c2a-da11-97d0-d0b6-37ccd4990f18@synopsys.com> From: Andy Shevchenko Date: Fri, 6 Jan 2017 23:32:12 +0200 Message-ID: Subject: Re: [PATCH] i2c: core: helper function to detect slave mode To: Luis Oliveira Cc: Wolfram Sang , Rob Herring , Mark Rutland , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , linux-i2c@vger.kernel.org, devicetree , "linux-kernel@vger.kernel.org" , Ramiro.Oliveira@synopsys.com, Joao Pinto , CARLOS.PALMINHA@synopsys.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 6, 2017 at 7:46 PM, Luis Oliveira wrote: > On 06-Jan-17 17:17, Andy Shevchenko wrote: >> On Fri, Jan 6, 2017 at 7:15 PM, Luis Oliveira >> 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