Received: by 10.223.185.116 with SMTP id b49csp5199795wrg; Wed, 7 Mar 2018 07:53:47 -0800 (PST) X-Google-Smtp-Source: AG47ELufWq7CtOkZLylsyzppFfOu932O87utzNN3TT++1Pu3eoQr+8MhS5Dy+bBWiBLl3vh6mqGk X-Received: by 10.101.86.1 with SMTP id l1mr18628158pgs.140.1520438027851; Wed, 07 Mar 2018 07:53:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520438027; cv=none; d=google.com; s=arc-20160816; b=S6g17okCkG0vrR9BK6NTQ4sgDC6FNePT4e7v707PQWO/Ra10O1dPZDKRRqGDBRhPSe U73uVNQPdWUTBJJ0bwy/7Lw3uvsErbMz1xYdHl6zmh6HaebayG3x6PUVKLNA77QfscT1 +45xFFGKK41wG+fFl/ndXZvTuHP5NqLqNA6ZoTtVM6Z2lc0FrfyrfPGxUKrIs4+g7x0s wQh8ni+K5/Wnb8OAXKIHDukmHIomF0chjXjJtYh2KM0Nut+5fQl8v5S0nNv/nASzAqsh de/EiH5RBaka6MY1QqKWOiVgwu0Nyyvx+b3Wx3rFMghIMgJy6OMP8WSrD6mMKyRw90SY h1MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=LoMxpuNy0Md0j35bJniRJXqQuvD8ccy21SP/IFpBucM=; b=jx8l/ZVHDgZhOmwUV5RDW4y3RTxcMtkybJWxF2yfZCyeZWbFAJ4pHXJ3MgxlC9Uemo dbQsn3ZLk5YE4wf1+Tw/Xvso7Gwd47RYBTtCT2TVrrpeeWG/sWhy5GtOP91rG2dlgfA0 mIfYwIJoocQkVYZpdBswrBTkvBW1Sj6bAiWh/+XvlNKTZh6mLT7Ftco2DEIjX0SqPczI tsayPdvyeWfarGynL7s4TzCwniXS1FU3G45uJGPqo5Hv9/UdsrdwTQtOERcdUca/wPiY WGfZkeTQX5ygZLpTDZJ1f9I2QX6SnAhVs8UKyauad5XUf98Po/oaywJj1GZR+mlIubjR wtUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jdoYLNfz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd7-v6si323785plb.474.2018.03.07.07.53.33; Wed, 07 Mar 2018 07:53:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jdoYLNfz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934194AbeCGPwM (ORCPT + 99 others); Wed, 7 Mar 2018 10:52:12 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:40573 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934166AbeCGPwC (ORCPT ); Wed, 7 Mar 2018 10:52:02 -0500 Received: by mail-wm0-f67.google.com with SMTP id t6so5620132wmt.5 for ; Wed, 07 Mar 2018 07:52:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=LoMxpuNy0Md0j35bJniRJXqQuvD8ccy21SP/IFpBucM=; b=jdoYLNfzNtNGm+kFqySpWjQUn5yGFWgMMRwivw4PCfb1Vt2fdRs9C/B5EUBl6MGPb0 oc83nbg+meGElc8Is/uLjPnZNGplFK+B43OPjLFwurZhXUqkUwXO8i+ioWABjCG7WNCq +2Nax3IDeuzoZPx1+fO0Z46tUBb0wgAGh5c0c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=LoMxpuNy0Md0j35bJniRJXqQuvD8ccy21SP/IFpBucM=; b=FlniQsuaHHRbrcNscrlHnVZYqgr0Bdj6nA9mw46aUIdptsRRJPojLMR3ugCYi8eelQ atnX4qJyXf/1sUaZ9X/X4oLd/gQ5esO5Z1LQUa3uBMWewsPDsI+nC6y7YrLmVOBu9YWw hrDubLGAP2cBG7ghu/84OurGTOGQKkyETuM0n9uCabrqGHyeHBiVrJm+u3hzf+a4vgRq zfd8UKfxAm6AA76KYH8dgfRiV8iqSzZedwJGjjeXjxE/LnLChTEkbPwktts/JkBqlwm1 27KX4IoVKEsgJVJDIxU5wRhiXX5WSwlU8nCcgELoLTVYkyxnW8wun0kxyXNoIV6nwjbj /5ew== X-Gm-Message-State: AElRT7EGCeeXBUAFqUckFnnTsWPYVMMQ4hIDO5mH7BsLoa0c7k4a5Hde crFANm6M+H4EsogjXLY9rmuC3zoHIY0= X-Received: by 10.28.107.9 with SMTP id g9mr14482009wmc.157.1520437921019; Wed, 07 Mar 2018 07:52:01 -0800 (PST) Received: from dell ([2.27.35.218]) by smtp.gmail.com with ESMTPSA id z7sm17581924wrg.1.2018.03.07.07.51.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Mar 2018 07:51:59 -0800 (PST) Date: Wed, 7 Mar 2018 15:51:58 +0000 From: Lee Jones To: Enric Balletbo i Serra Cc: groeck@chromium.org, andy.shevchenko@gmail.com, kernel@collabora.com, gwendal@chromium.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 4/8] mfd: cros_ec_dev: Register cros-ec-rtc driver as a subdevice. Message-ID: <20180307155158.7quxpjglnocxjxku@dell> References: <20180226102606.15093-1-enric.balletbo@collabora.com> <20180226102606.15093-5-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180226102606.15093-5-enric.balletbo@collabora.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Feb 2018, Enric Balletbo i Serra wrote: > Check whether this EC instance has RTC host command support and instatiate > the RTC driver as a subdevice in such case. > > Signed-off-by: Enric Balletbo i Serra > Reviewed-by: Gwendal Grignou > Reviewed-by: Andy Shevchenko > --- > > Changes in v3: > - [4/8] Add the Reviewed-by Andy Shevchenko. > > Changes in v2: > - [4/8] Add the Reviewed-by Gwendal. > > drivers/mfd/cros_ec_dev.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c > index f98e5beffca6..33fe1b439ee2 100644 > --- a/drivers/mfd/cros_ec_dev.c > +++ b/drivers/mfd/cros_ec_dev.c > @@ -389,6 +389,10 @@ static void cros_ec_sensors_register(struct cros_ec_dev *ec) > kfree(msg); > } > > +static const struct mfd_cell cros_ec_rtc_cell = { > + .name = "cros-ec-rtc", > +}; > + > static int ec_device_probe(struct platform_device *pdev) > { > int retval = -ENOMEM; > @@ -437,6 +441,16 @@ static int ec_device_probe(struct platform_device *pdev) > if (cros_ec_check_features(ec, EC_FEATURE_MOTION_SENSE)) > cros_ec_sensors_register(ec); > > + /* check whether this EC instance has RTC host command support */ Nit: "Check ..." > + if (cros_ec_check_features(ec, EC_FEATURE_RTC)) { > + retval = mfd_add_devices(ec->dev, PLATFORM_DEVID_AUTO, > + &cros_ec_rtc_cell, 1, NULL, 0, NULL); Please use ARRAY_SIZE(). > + if (retval) > + dev_err(ec->dev, > + "failed to add cros-ec-rtc device: %d\n", > + retval); > + } > + > /* Take control of the lightbar from the EC. */ > lb_manual_suspend_ctrl(ec, 1); > -- Lee Jones Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog