From: Xin Ji <xji@analogixsemi.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
bliang@analogixsemi.com, qwen@analogixsemi.com,
jli@analogixsemi.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v7 1/3] usb: typec: tcpci: move tcpci.h to include/linux/usb/ directory
Date: Tue, 8 Mar 2022 15:13:44 +0800 [thread overview]
Message-ID: <20220308071344.GA1137047@anxtwsw-Precision-3640-Tower> (raw)
In-Reply-To: <142b1c42-a8d5-3885-0af0-e07c9d4dd887@roeck-us.net>
On Mon, Mar 07, 2022 at 11:06:38PM -0800, Guenter Roeck wrote:
> On 3/7/22 18:26, Xin Ji wrote:
> > On Mon, Mar 07, 2022 at 06:49:03AM -0800, Guenter Roeck wrote:
> > > On 3/7/22 01:09, Xin Ji wrote:
> > > > Move tcpci.h as a global file, better for other USB Type-C driver
> > > > access.
> > > >
> > >
> > > The idea was to have tcpci compliant drivers in the tcpm/ subdirectory.
> > > If I recall correctly, the reason for having this driver elsewhere is
> > > that it doesn't support tcpm. That should be explained here.
> > > "better for other USB Type-C driver" is not a reason for moving
> > > a header file.
> > >
> > > > Fix compiling error after moving tcpci.h to include/linux/usb/.
> > > >
> > > I don't think this should be part of the commit description.
> > >
> > > Guenter
> >
> > Hi Guenter, OK, got it, this patch is recommended by Heikki, as our
> > driver will refer some TCPCI registers, he prefer to move tcpci.h in to
> > global directory.
> >
>
> The patch itself is fine. My concern is the description which, in my opinion,
> does not adequately explain the reason for the patch.
>
> Also, "Fix compiling error after moving tcpci.h to include/linux/usb/"
> sounds like a change log, which should not be part of the description either.
>
> Guenter
Hi Guenter, sorry for misunderstand, I'll change the commit message in
the next serial.
Thanks,
Xin
>
> > Hi Heikki, please help to give your opinion, thanks!
> >
> > Thanks,
> > Xin
> > >
> > > > Signed-off-by: Xin Ji <xji@analogixsemi.com>
> > > > ---
> > > > drivers/usb/typec/tcpm/tcpci.c | 3 +--
> > > > drivers/usb/typec/tcpm/tcpci_maxim.c | 3 +--
> > > > drivers/usb/typec/tcpm/tcpci_mt6360.c | 3 +--
> > > > drivers/usb/typec/tcpm/tcpci_rt1711h.c | 2 +-
> > > > {drivers/usb/typec/tcpm => include/linux/usb}/tcpci.h | 1 +
> > > > 5 files changed, 5 insertions(+), 7 deletions(-)
> > > > rename {drivers/usb/typec/tcpm => include/linux/usb}/tcpci.h (99%)
> > > >
> > > > diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> > > > index e07d26a3cd8e..9c907296596f 100644
> > > > --- a/drivers/usb/typec/tcpm/tcpci.c
> > > > +++ b/drivers/usb/typec/tcpm/tcpci.c
> > > > @@ -13,11 +13,10 @@
> > > > #include <linux/property.h>
> > > > #include <linux/regmap.h>
> > > > #include <linux/usb/pd.h>
> > > > +#include <linux/usb/tcpci.h>
> > > > #include <linux/usb/tcpm.h>
> > > > #include <linux/usb/typec.h>
> > > > -#include "tcpci.h"
> > > > -
> > > > #define PD_RETRY_COUNT_DEFAULT 3
> > > > #define PD_RETRY_COUNT_3_0_OR_HIGHER 2
> > > > #define AUTO_DISCHARGE_DEFAULT_THRESHOLD_MV 3500
> > > > diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c
> > > > index df2505570f07..4b6705f3d7b7 100644
> > > > --- a/drivers/usb/typec/tcpm/tcpci_maxim.c
> > > > +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c
> > > > @@ -11,11 +11,10 @@
> > > > #include <linux/module.h>
> > > > #include <linux/regmap.h>
> > > > #include <linux/usb/pd.h>
> > > > +#include <linux/usb/tcpci.h>
> > > > #include <linux/usb/tcpm.h>
> > > > #include <linux/usb/typec.h>
> > > > -#include "tcpci.h"
> > > > -
> > > > #define PD_ACTIVITY_TIMEOUT_MS 10000
> > > > #define TCPC_VENDOR_ALERT 0x80
> > > > diff --git a/drivers/usb/typec/tcpm/tcpci_mt6360.c b/drivers/usb/typec/tcpm/tcpci_mt6360.c
> > > > index f1bd9e09bc87..9e0338bce7ef 100644
> > > > --- a/drivers/usb/typec/tcpm/tcpci_mt6360.c
> > > > +++ b/drivers/usb/typec/tcpm/tcpci_mt6360.c
> > > > @@ -11,10 +11,9 @@
> > > > #include <linux/of.h>
> > > > #include <linux/platform_device.h>
> > > > #include <linux/regmap.h>
> > > > +#include <linux/usb/tcpci.h>
> > > > #include <linux/usb/tcpm.h>
> > > > -#include "tcpci.h"
> > > > -
> > > > #define MT6360_REG_VCONNCTRL1 0x8C
> > > > #define MT6360_REG_MODECTRL2 0x8F
> > > > #define MT6360_REG_SWRESET 0xA0
> > > > diff --git a/drivers/usb/typec/tcpm/tcpci_rt1711h.c b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> > > > index b56a0880a044..3291ca4948da 100644
> > > > --- a/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> > > > +++ b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> > > > @@ -10,9 +10,9 @@
> > > > #include <linux/i2c.h>
> > > > #include <linux/interrupt.h>
> > > > #include <linux/gpio/consumer.h>
> > > > +#include <linux/usb/tcpci.h>
> > > > #include <linux/usb/tcpm.h>
> > > > #include <linux/regmap.h>
> > > > -#include "tcpci.h"
> > > > #define RT1711H_VID 0x29CF
> > > > #define RT1711H_PID 0x1711
> > > > diff --git a/drivers/usb/typec/tcpm/tcpci.h b/include/linux/usb/tcpci.h
> > > > similarity index 99%
> > > > rename from drivers/usb/typec/tcpm/tcpci.h
> > > > rename to include/linux/usb/tcpci.h
> > > > index b2edd45f13c6..20c0bedb8ec8 100644
> > > > --- a/drivers/usb/typec/tcpm/tcpci.h
> > > > +++ b/include/linux/usb/tcpci.h
> > > > @@ -9,6 +9,7 @@
> > > > #define __LINUX_USB_TCPCI_H
> > > > #include <linux/usb/typec.h>
> > > > +#include <linux/usb/tcpm.h>
> > > > #define TCPC_VENDOR_ID 0x0
> > > > #define TCPC_PRODUCT_ID 0x2
prev parent reply other threads:[~2022-03-08 7:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 9:09 Xin Ji
2022-03-07 9:09 ` [PATCH v7 2/3] dt-bindings: usb: Add analogix anx7411 PD binding Xin Ji
2022-03-07 9:09 ` [PATCH v7 3/3] usb: typec: anx7411: Add Analogix PD ANX7411 support Xin Ji
2022-03-07 14:49 ` [PATCH v7 1/3] usb: typec: tcpci: move tcpci.h to include/linux/usb/ directory Guenter Roeck
2022-03-08 2:26 ` Xin Ji
2022-03-08 7:06 ` Guenter Roeck
2022-03-08 7:13 ` Xin Ji [this message]
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=20220308071344.GA1137047@anxtwsw-Precision-3640-Tower \
--to=xji@analogixsemi.com \
--cc=bliang@analogixsemi.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jli@analogixsemi.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=matthias.bgg@gmail.com \
--cc=qwen@analogixsemi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®