Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4530143imm; Fri, 18 May 2018 06:41:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo7SgXGSVTFMO8PY0Ca+wGk0f8jw/KGMIJFI7PvRh6rAMib359UUxamYUimK15ecQBwtMqQ X-Received: by 2002:a63:3706:: with SMTP id e6-v6mr7552765pga.281.1526650900971; Fri, 18 May 2018 06:41:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526650900; cv=none; d=google.com; s=arc-20160816; b=drhak/cfTBENnLSfXTfa1J9uuQ9ok8v3Tzrd0/62IrudrgezXZl48fxbLb1P+crYyC x9uim7XoP8jatUBQpCwdoKAytXkF5GuFanXFUX1yxpRUIhvzDibiGwyegWgh9EIXbWEc JyxkPJ2NO+3dQTRQivYoWq9DORm9emJfK9ak9FdxN6WkACdbuttFn+f2a5Ybx22Be6hG RDhuzC7E2kYpKrxDWuqcR+GMNB7wQufAdoYKJ8CHHgjB9KY5SPfHKekk3CvJ8zX9NopW ucrZXW3NovrpZkkuf0wCn2nUdCo8bxKCNNyJNuyqiywdnBm+eENM7F3NwWO0fY5LQVEF q+SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=HLGgT64nSXipUDLBv3h0gToWIyHQ+T18wNGuxLUSlD0=; b=mcWdIusmMgbVH/mqmLcNCfC63o7nmB+De1/+KyXh88Qskz/L0Aze/98wBFkoBRgwNh VLJF5mhjwosXF5nfdODkq7Gfn5gzYOjVj4fkC0NMme5r0p/CGsnaQNsbvWWRiFYlrrFY yWPTVg4aZTZ+eMejD3LcaFlNRgAfXaD8rlvZ8RUU0i+PAQPmAyw/pfTOoxe1mI0D0brY NdI+A9unD4wLgvg9NboJ06C+ESlN+yOEk2/+L7gU6EZmJgwDx536etbMMVU3xQrJVJ3c ydGuS3/kg2I1P/U0G4WSUVYM1XO7+8EDmYf1GBOSx7eNr5zf6lH42Vnc5iGAjokowL2x utMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=n8Sm3azN; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c23-v6si7557227pli.540.2018.05.18.06.41.26; Fri, 18 May 2018 06:41:40 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=n8Sm3azN; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752366AbeERNlP (ORCPT + 99 others); Fri, 18 May 2018 09:41:15 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:41652 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751560AbeERNlM (ORCPT ); Fri, 18 May 2018 09:41:12 -0400 Received: by mail-qk0-f193.google.com with SMTP id d125-v6so6418547qkb.8; Fri, 18 May 2018 06:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HLGgT64nSXipUDLBv3h0gToWIyHQ+T18wNGuxLUSlD0=; b=n8Sm3azNiKsTrlA8GW4xqml81JhEvB/PJNAJ9kuZuKcZpOAuYWewuCyU0q2m4XK56O kob87Ezg/z4QvV8il/Avt+8nrgmC51aBO63XubEymM0Q+wul3jyd9fQi7cAPWQZw8A99 kE5BKBr7lWjLHQaZ97CGHqq0D8Khp4F+HW9MGmjfPUV+SFJ2Eb4xY8VYkcQyLgXVVbpb QKLImWT9FUU/t/r/LVsFt3QkwP52jMRPuaDjHaN5zF40c3Gm6bsVWe6zCKK38kf2MpRK wjwwZdP0i5usYD+pz23siFm23zO9OosPoBTOLp8QMeIOYoepDSFsRBpbu0V3PAlBnzJJ xz1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HLGgT64nSXipUDLBv3h0gToWIyHQ+T18wNGuxLUSlD0=; b=p96iiqAOdkPcTjh9lysdY+0V6pufH8IS+D5Xzt2ptXsZ4aqMT366Alzkshme3fHitq XCR6gDzst7NOD0jgIcrd2Owhf8T8hevusnfNkgSO7+OeGkj+A5oHnMoDkfGDoVzdlNe1 OkMZGVi/tCFNbE09l5YyMccT8Y0K3CS3f8N0PbIIrmU67OdW1vvKyAj00Q339sGUTq0a nqeuNfZfQGNXsxkaYuy4lP/rDia8j6O0sAp2botqWsmzk8jtV6sjf+/DI6dcu1MlSa3z xNlYDgxT4ZXj/Gr9Z3uCbfUiUo/YVvtInHTOJv9AwwljA5UPSDSG75xGtDxx22JgbLGZ 9ujw== X-Gm-Message-State: ALKqPweaNZzgCf8kA91LdaGxw7ei9yVB3xMao+alU8lVdY14OII5Hvec c8ZgI0qJRUSqeLVLMJACczHbLqVzrMhon40YbDI= X-Received: by 2002:a37:4d56:: with SMTP id a83-v6mr8835824qkb.105.1526650871292; Fri, 18 May 2018 06:41:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.13.68 with HTTP; Fri, 18 May 2018 06:41:10 -0700 (PDT) In-Reply-To: <1526648704-16873-5-git-send-email-narmstrong@baylibre.com> References: <1526648704-16873-1-git-send-email-narmstrong@baylibre.com> <1526648704-16873-5-git-send-email-narmstrong@baylibre.com> From: Enric Balletbo Serra Date: Fri, 18 May 2018 15:41:10 +0200 Message-ID: Subject: Re: [PATCH v2 4/5] mfd: cros_ec_dev: Add CEC sub-device registration To: Neil Armstrong Cc: David Airlie , Hans Verkuil , Lee Jones , Olof Johansson , Sean Paul , sadolfsson@google.com, Felix Ekblom , Benson Leung , darekm@google.com, =?UTF-8?Q?St=C3=A9phane_Marchesin?= , Fabien Parent , dri-devel , linux-media@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-05-18 15:05 GMT+02:00 Neil Armstrong : > The EC can expose a CEC bus, thus add the cros-ec-cec MFD sub-device > when the CEC feature bit is present. > > Signed-off-by: Neil Armstrong > --- > drivers/mfd/cros_ec_dev.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c > index 1d6dc5c..272969e 100644 > --- a/drivers/mfd/cros_ec_dev.c > +++ b/drivers/mfd/cros_ec_dev.c > @@ -383,6 +383,10 @@ static void cros_ec_sensors_register(struct cros_ec_dev *ec) > kfree(msg); > } > > +static const struct mfd_cell cros_ec_cec_cells[] = { > + { .name = "cros-ec-cec" } > +}; > + > static const struct mfd_cell cros_ec_rtc_cells[] = { > { .name = "cros-ec-rtc" } > }; > @@ -426,6 +430,18 @@ 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 CEC host command support */ > + if (cros_ec_check_features(ec, EC_FEATURE_CEC)) { > + retval = mfd_add_devices(ec->dev, PLATFORM_DEVID_AUTO, > + cros_ec_cec_cells, > + ARRAY_SIZE(cros_ec_cec_cells), > + NULL, 0, NULL); > + if (retval) > + dev_err(ec->dev, > + "failed to add cros-ec-cec device: %d\n", > + retval); > + } > + > /* Check whether this EC instance has RTC host command support */ > if (cros_ec_check_features(ec, EC_FEATURE_RTC)) { > retval = mfd_add_devices(ec->dev, PLATFORM_DEVID_AUTO, > -- > 2.7.4 > Reviewed-by: Enric Balletbo i Serra Thanks, Enric