From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Sebastian Reichel <sre@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Hans de Goede <hdegoede@redhat.com>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
platform-driver-x86@vger.kernel.org, linux-usb@vger.kernel.org,
linux-arm-msm@vger.kernel.org, Nikita Travkin <nikita@trvn.ru>
Subject: Re: [PATCH v4 3/6] usb: typec: ucsi: add Lenovo Yoga C630 glue driver
Date: Wed, 29 May 2024 18:26:07 +0300 (EEST) [thread overview]
Message-ID: <97448807-e567-05a4-9361-efcc84b5f07f@linux.intel.com> (raw)
In-Reply-To: <CAA8EJproC_mW4pZ_C-BUUm73xfqja0EKVLvCZ+C_1dhW3xoEnw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3652 bytes --]
On Wed, 29 May 2024, Dmitry Baryshkov wrote:
> On Wed, 29 May 2024 at 17:20, Ilpo Järvinen
> <ilpo.jarvinen@linux.intel.com> wrote:
> >
> > On Tue, 28 May 2024, Dmitry Baryshkov wrote:
> >
> > > The Lenovo Yoga C630 WOS laptop provides implements UCSI interface in
> > > the onboard EC. Add glue driver to interface the platform's UCSI
> > > implementation.
> > >
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > ---
> > > drivers/usb/typec/ucsi/Kconfig | 9 ++
> > > drivers/usb/typec/ucsi/Makefile | 1 +
> > > drivers/usb/typec/ucsi/ucsi_yoga_c630.c | 189 ++++++++++++++++++++++++++++++++
> > > 3 files changed, 199 insertions(+)
> > >
> > > diff --git a/drivers/usb/typec/ucsi/Kconfig b/drivers/usb/typec/ucsi/Kconfig
> > > index bdcb1764cfae..680e1b87b152 100644
> > > --- a/drivers/usb/typec/ucsi/Kconfig
> > > +++ b/drivers/usb/typec/ucsi/Kconfig
> > > @@ -69,4 +69,13 @@ config UCSI_PMIC_GLINK
> > > To compile the driver as a module, choose M here: the module will be
> > > called ucsi_glink.
> > >
> > > +config UCSI_LENOVO_YOGA_C630
> > > + tristate "UCSI Interface Driver for Lenovo Yoga C630"
> > > + depends on EC_LENOVO_YOGA_C630
> > > + help
> > > + This driver enables UCSI support on the Lenovo Yoga C630 laptop.
> > > +
> > > + To compile the driver as a module, choose M here: the module will be
> > > + called ucsi_yoga_c630.
> > > +
> > > endif
> > > diff --git a/drivers/usb/typec/ucsi/Makefile b/drivers/usb/typec/ucsi/Makefile
> > > index b4679f94696b..aed41d23887b 100644
> > > --- a/drivers/usb/typec/ucsi/Makefile
> > > +++ b/drivers/usb/typec/ucsi/Makefile
> > > @@ -21,3 +21,4 @@ obj-$(CONFIG_UCSI_ACPI) += ucsi_acpi.o
> > > obj-$(CONFIG_UCSI_CCG) += ucsi_ccg.o
> > > obj-$(CONFIG_UCSI_STM32G0) += ucsi_stm32g0.o
> > > obj-$(CONFIG_UCSI_PMIC_GLINK) += ucsi_glink.o
> > > +obj-$(CONFIG_UCSI_LENOVO_YOGA_C630) += ucsi_yoga_c630.o
> > > diff --git a/drivers/usb/typec/ucsi/ucsi_yoga_c630.c b/drivers/usb/typec/ucsi/ucsi_yoga_c630.c
> > > new file mode 100644
> > > index 000000000000..ca1ab5c81b87
> > > --- /dev/null
> > > +++ b/drivers/usb/typec/ucsi/ucsi_yoga_c630.c
> > > @@ -0,0 +1,189 @@
> > > +// SPDX-License-Identifier: GPL-2.0-only
> > > +/*
> > > + * Copyright (c) 2022-2024, Linaro Ltd
> > > + * Authors:
> > > + * Bjorn Andersson
> > > + * Dmitry Baryshkov
> > > + */
> > > +#include <linux/auxiliary_bus.h>
> > > +#include <linux/module.h>
> > > +#include <linux/platform_data/lenovo-yoga-c630.h>
> > > +
> > > +#include "ucsi.h"
> > > +
> > > +struct yoga_c630_ucsi {
> > > + struct yoga_c630_ec *ec;
> > > + struct ucsi *ucsi;
> > > + struct notifier_block nb;
> > > + struct completion complete;
> >
> > Add includes for what you used here.
> >
> > > + unsigned long flags;
> > > +#define UCSI_C630_COMMAND_PENDING 0
> > > +#define UCSI_C630_ACK_PENDING 1
> > > + u16 version;
> > > +};
> > > +
> > > +static int yoga_c630_ucsi_read(struct ucsi *ucsi, unsigned int offset,
> >
> > extra space
> >
> > > + void *val, size_t val_len)
> > > +{
> > > + struct yoga_c630_ucsi *uec = ucsi_get_drvdata(ucsi);
> >
> > Missing include for ucsi_get_drvdata
>
> I'll review my includes, but this comment and the comment for
> ucsi_operations are clearly wrong. There is a corresponding include.
Ah, sorry about that. I completely missed there was that local include.
--
i.
next prev parent reply other threads:[~2024-05-29 15:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 20:44 [PATCH v4 0/6] power: supply: Lenovo Yoga C630 EC Dmitry Baryshkov
2024-05-28 20:44 ` [PATCH v4 1/6] dt-bindings: platform: Add " Dmitry Baryshkov
2024-05-28 20:44 ` [PATCH v4 2/6] platform: arm64: add Lenovo Yoga C630 WOS EC driver Dmitry Baryshkov
2024-05-28 23:51 ` Bryan O'Donoghue
2024-05-28 23:56 ` Dmitry Baryshkov
2024-05-29 8:08 ` Bryan O'Donoghue
2024-05-29 15:08 ` Ilpo Järvinen
2024-05-28 20:44 ` [PATCH v4 3/6] usb: typec: ucsi: add Lenovo Yoga C630 glue driver Dmitry Baryshkov
2024-05-29 15:20 ` Ilpo Järvinen
2024-05-29 15:22 ` Dmitry Baryshkov
2024-05-29 15:26 ` Ilpo Järvinen [this message]
2024-05-29 15:41 ` Bryan O'Donoghue
2024-05-31 0:22 ` Dmitry Baryshkov
2024-05-28 20:44 ` [PATCH v4 4/6] power: supply: lenovo_yoga_c630_battery: add Lenovo C630 driver Dmitry Baryshkov
2024-05-29 15:41 ` Ilpo Järvinen
2024-05-31 0:58 ` Dmitry Baryshkov
2024-05-29 15:51 ` Bryan O'Donoghue
2024-05-31 1:05 ` Dmitry Baryshkov
2024-06-05 23:52 ` Sebastian Reichel
2024-05-28 20:44 ` [PATCH v4 5/6] arm64: dts: qcom: sdm845: describe connections of USB/DP port Dmitry Baryshkov
2024-05-29 16:05 ` Bryan O'Donoghue
2024-05-28 20:44 ` [PATCH v4 6/6] arm64: dts: qcom: c630: Add Embedded Controller node Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=97448807-e567-05a4-9361-efcc84b5f07f@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nikita@trvn.ru \
--cc=platform-driver-x86@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.