* [PATCH] bus: mhi: host: pci_generic: Add macro for some vids @ 2022-11-02 2:44 Slark Xiao 2022-11-03 12:50 ` Manivannan Sadhasivam 0 siblings, 1 reply; 4+ messages in thread From: Slark Xiao @ 2022-11-02 2:44 UTC (permalink / raw) To: mani, gregkh, loic.poulain Cc: dnlplm, yonglin.tan, fabio.porcedda, mhi, linux-arm-msm, linux-kernel, Slark Xiao To make code neat and for convenience purpose, using macro for some vids. Refer to previous patch in pci_ids.h side, they are not allowed to add new entries of single driver needed. So we add it in our local file. Signed-off-by: Slark Xiao <slark_xiao@163.com> --- drivers/bus/mhi/host/pci_generic.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c index c4259cb2d289..5abc778a5290 100644 --- a/drivers/bus/mhi/host/pci_generic.c +++ b/drivers/bus/mhi/host/pci_generic.c @@ -24,6 +24,10 @@ #define HEALTH_CHECK_PERIOD (HZ * 2) +#define PCI_VENDOR_ID_THALES 0x1269 + +#define PCI_VENDOR_ID_QUECTEL 0x1eac + /** * struct mhi_pci_dev_info - MHI PCI device specific information * @config: MHI controller configuration @@ -557,11 +561,11 @@ static const struct pci_device_id mhi_pci_id_table[] = { .driver_data = (kernel_ulong_t) &mhi_telit_fn990_info }, { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308), .driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info }, - { PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */ + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1001), /* EM120R-GL (sdx24) */ .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, - { PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */ + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */ .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, - { PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */ + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */ .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, /* T99W175 (sdx55), Both for eSIM and Non-eSIM */ { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab), @@ -585,16 +589,16 @@ static const struct pci_device_id mhi_pci_id_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0d9), .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx65_info }, /* MV31-W (Cinterion) */ - { PCI_DEVICE(0x1269, 0x00b3), + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b3), .driver_data = (kernel_ulong_t) &mhi_mv31_info }, /* MV31-W (Cinterion), based on new baseline */ - { PCI_DEVICE(0x1269, 0x00b4), + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b4), .driver_data = (kernel_ulong_t) &mhi_mv31_info }, /* MV32-WA (Cinterion) */ - { PCI_DEVICE(0x1269, 0x00ba), + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00ba), .driver_data = (kernel_ulong_t) &mhi_mv32_info }, /* MV32-WB (Cinterion) */ - { PCI_DEVICE(0x1269, 0x00bb), + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00bb), .driver_data = (kernel_ulong_t) &mhi_mv32_info }, { } }; -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] bus: mhi: host: pci_generic: Add macro for some vids 2022-11-02 2:44 [PATCH] bus: mhi: host: pci_generic: Add macro for some vids Slark Xiao @ 2022-11-03 12:50 ` Manivannan Sadhasivam 2022-11-07 2:21 ` Slark Xiao 0 siblings, 1 reply; 4+ messages in thread From: Manivannan Sadhasivam @ 2022-11-03 12:50 UTC (permalink / raw) To: Slark Xiao Cc: gregkh, loic.poulain, dnlplm, yonglin.tan, fabio.porcedda, mhi, linux-arm-msm, linux-kernel On Wed, Nov 02, 2022 at 10:44:37AM +0800, Slark Xiao wrote: > To make code neat and for convenience purpose, using macro for > some vids. s/using/use s/vids/VIDs > Refer to previous patch in pci_ids.h side, they are > not allowed to add new entries of single driver needed. So we > add it in our local file. > Reference to the previous patch has no relationship with this commit once merged. How about, "These macros are supposed to be added to pci_ids.h. But until the macros are used in multiple places, it is not recommended. So adding it locally for now." > Signed-off-by: Slark Xiao <slark_xiao@163.com> > --- > drivers/bus/mhi/host/pci_generic.c | 18 +++++++++++------- > 1 file changed, 11 insertions(+), 7 deletions(-) > > diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c > index c4259cb2d289..5abc778a5290 100644 > --- a/drivers/bus/mhi/host/pci_generic.c > +++ b/drivers/bus/mhi/host/pci_generic.c > @@ -24,6 +24,10 @@ > > #define HEALTH_CHECK_PERIOD (HZ * 2) > Add a comment, /* PCI VID definitions */ > +#define PCI_VENDOR_ID_THALES 0x1269 > + No need of newline > +#define PCI_VENDOR_ID_QUECTEL 0x1eac > + Just use a space after PCI_VENDOR_ID_QUECTEL like above. Thanks, Mani > /** > * struct mhi_pci_dev_info - MHI PCI device specific information > * @config: MHI controller configuration > @@ -557,11 +561,11 @@ static const struct pci_device_id mhi_pci_id_table[] = { > .driver_data = (kernel_ulong_t) &mhi_telit_fn990_info }, > { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308), > .driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info }, > - { PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */ > + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1001), /* EM120R-GL (sdx24) */ > .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, > - { PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */ > + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */ > .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, > - { PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */ > + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */ > .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, > /* T99W175 (sdx55), Both for eSIM and Non-eSIM */ > { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab), > @@ -585,16 +589,16 @@ static const struct pci_device_id mhi_pci_id_table[] = { > { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0d9), > .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx65_info }, > /* MV31-W (Cinterion) */ > - { PCI_DEVICE(0x1269, 0x00b3), > + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b3), > .driver_data = (kernel_ulong_t) &mhi_mv31_info }, > /* MV31-W (Cinterion), based on new baseline */ > - { PCI_DEVICE(0x1269, 0x00b4), > + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b4), > .driver_data = (kernel_ulong_t) &mhi_mv31_info }, > /* MV32-WA (Cinterion) */ > - { PCI_DEVICE(0x1269, 0x00ba), > + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00ba), > .driver_data = (kernel_ulong_t) &mhi_mv32_info }, > /* MV32-WB (Cinterion) */ > - { PCI_DEVICE(0x1269, 0x00bb), > + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00bb), > .driver_data = (kernel_ulong_t) &mhi_mv32_info }, > { } > }; > -- > 2.17.1 > -- மணிவண்ணன் சதாசிவம் ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re:Re: [PATCH] bus: mhi: host: pci_generic: Add macro for some vids 2022-11-03 12:50 ` Manivannan Sadhasivam @ 2022-11-07 2:21 ` Slark Xiao 2022-11-07 7:40 ` Manivannan Sadhasivam 0 siblings, 1 reply; 4+ messages in thread From: Slark Xiao @ 2022-11-07 2:21 UTC (permalink / raw) To: Manivannan Sadhasivam Cc: gregkh, loic.poulain, dnlplm, yonglin.tan, fabio.porcedda, mhi, linux-arm-msm, linux-kernel At 2022-11-03 20:50:09, "Manivannan Sadhasivam" <mani@kernel.org> wrote: >On Wed, Nov 02, 2022 at 10:44:37AM +0800, Slark Xiao wrote: >> To make code neat and for convenience purpose, using macro for >> some vids. > >s/using/use >s/vids/VIDs > >> Refer to previous patch in pci_ids.h side, they are >> not allowed to add new entries of single driver needed. So we >> add it in our local file. >> > >Reference to the previous patch has no relationship with this commit once >merged. How about, > >"These macros are supposed to be added to pci_ids.h. But until the macros are >used in multiple places, it is not recommended. So adding it locally for now." > >> Signed-off-by: Slark Xiao <slark_xiao@163.com> >> --- >> drivers/bus/mhi/host/pci_generic.c | 18 +++++++++++------- >> 1 file changed, 11 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c >> index c4259cb2d289..5abc778a5290 100644 >> --- a/drivers/bus/mhi/host/pci_generic.c >> +++ b/drivers/bus/mhi/host/pci_generic.c >> @@ -24,6 +24,10 @@ >> >> #define HEALTH_CHECK_PERIOD (HZ * 2) >> > >Add a comment, > >/* PCI VID definitions */ > >> +#define PCI_VENDOR_ID_THALES 0x1269 >> + > >No need of newline > >> +#define PCI_VENDOR_ID_QUECTEL 0x1eac >> + > >Just use a space after PCI_VENDOR_ID_QUECTEL like above. > >Thanks, >Mani Hi Mani, I didn't get the point of this format issue. Do you mean remove that newline between these 2 definitions? > >> /** >> * struct mhi_pci_dev_info - MHI PCI device specific information >> * @config: MHI controller configuration >> @@ -557,11 +561,11 @@ static const struct pci_device_id mhi_pci_id_table[] = { >> .driver_data = (kernel_ulong_t) &mhi_telit_fn990_info }, >> { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308), >> .driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info }, >> - { PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */ >> + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1001), /* EM120R-GL (sdx24) */ >> .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, >> - { PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */ >> + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */ >> .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, >> - { PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */ >> + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */ >> .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, >> /* T99W175 (sdx55), Both for eSIM and Non-eSIM */ >> { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab), >> @@ -585,16 +589,16 @@ static const struct pci_device_id mhi_pci_id_table[] = { >> { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0d9), >> .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx65_info }, >> /* MV31-W (Cinterion) */ >> - { PCI_DEVICE(0x1269, 0x00b3), >> + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b3), >> .driver_data = (kernel_ulong_t) &mhi_mv31_info }, >> /* MV31-W (Cinterion), based on new baseline */ >> - { PCI_DEVICE(0x1269, 0x00b4), >> + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b4), >> .driver_data = (kernel_ulong_t) &mhi_mv31_info }, >> /* MV32-WA (Cinterion) */ >> - { PCI_DEVICE(0x1269, 0x00ba), >> + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00ba), >> .driver_data = (kernel_ulong_t) &mhi_mv32_info }, >> /* MV32-WB (Cinterion) */ >> - { PCI_DEVICE(0x1269, 0x00bb), >> + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00bb), >> .driver_data = (kernel_ulong_t) &mhi_mv32_info }, >> { } >> }; >> -- >> 2.17.1 >> > >-- >மணிவண்ணன் சதாசிவம் ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: [PATCH] bus: mhi: host: pci_generic: Add macro for some vids 2022-11-07 2:21 ` Slark Xiao @ 2022-11-07 7:40 ` Manivannan Sadhasivam 0 siblings, 0 replies; 4+ messages in thread From: Manivannan Sadhasivam @ 2022-11-07 7:40 UTC (permalink / raw) To: Slark Xiao Cc: Manivannan Sadhasivam, gregkh, loic.poulain, dnlplm, yonglin.tan, fabio.porcedda, mhi, linux-arm-msm, linux-kernel On Mon, Nov 07, 2022 at 10:21:36AM +0800, Slark Xiao wrote: > > > > > > > > > > > > > > > > > At 2022-11-03 20:50:09, "Manivannan Sadhasivam" <mani@kernel.org> wrote: > >On Wed, Nov 02, 2022 at 10:44:37AM +0800, Slark Xiao wrote: > >> To make code neat and for convenience purpose, using macro for > >> some vids. > > > >s/using/use > >s/vids/VIDs > > > >> Refer to previous patch in pci_ids.h side, they are > >> not allowed to add new entries of single driver needed. So we > >> add it in our local file. > >> > > > >Reference to the previous patch has no relationship with this commit once > >merged. How about, > > > >"These macros are supposed to be added to pci_ids.h. But until the macros are > >used in multiple places, it is not recommended. So adding it locally for now." > > > >> Signed-off-by: Slark Xiao <slark_xiao@163.com> > >> --- > >> drivers/bus/mhi/host/pci_generic.c | 18 +++++++++++------- > >> 1 file changed, 11 insertions(+), 7 deletions(-) > >> > >> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c > >> index c4259cb2d289..5abc778a5290 100644 > >> --- a/drivers/bus/mhi/host/pci_generic.c > >> +++ b/drivers/bus/mhi/host/pci_generic.c > >> @@ -24,6 +24,10 @@ > >> > >> #define HEALTH_CHECK_PERIOD (HZ * 2) > >> > > > >Add a comment, > > > >/* PCI VID definitions */ > > > >> +#define PCI_VENDOR_ID_THALES 0x1269 > >> + > > > >No need of newline > > > >> +#define PCI_VENDOR_ID_QUECTEL 0x1eac > >> + > > > >Just use a space after PCI_VENDOR_ID_QUECTEL like above. > > > >Thanks, > >Mani > Hi Mani, > I didn't get the point of this format issue. > Do you mean remove that newline between these 2 definitions? Yes, since both are VIDs, there is no need to add a newline between them. Thanks, Mani > > > >> /** > >> * struct mhi_pci_dev_info - MHI PCI device specific information > >> * @config: MHI controller configuration > >> @@ -557,11 +561,11 @@ static const struct pci_device_id mhi_pci_id_table[] = { > >> .driver_data = (kernel_ulong_t) &mhi_telit_fn990_info }, > >> { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308), > >> .driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info }, > >> - { PCI_DEVICE(0x1eac, 0x1001), /* EM120R-GL (sdx24) */ > >> + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1001), /* EM120R-GL (sdx24) */ > >> .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, > >> - { PCI_DEVICE(0x1eac, 0x1002), /* EM160R-GL (sdx24) */ > >> + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */ > >> .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, > >> - { PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */ > >> + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */ > >> .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, > >> /* T99W175 (sdx55), Both for eSIM and Non-eSIM */ > >> { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab), > >> @@ -585,16 +589,16 @@ static const struct pci_device_id mhi_pci_id_table[] = { > >> { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0d9), > >> .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx65_info }, > >> /* MV31-W (Cinterion) */ > >> - { PCI_DEVICE(0x1269, 0x00b3), > >> + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b3), > >> .driver_data = (kernel_ulong_t) &mhi_mv31_info }, > >> /* MV31-W (Cinterion), based on new baseline */ > >> - { PCI_DEVICE(0x1269, 0x00b4), > >> + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b4), > >> .driver_data = (kernel_ulong_t) &mhi_mv31_info }, > >> /* MV32-WA (Cinterion) */ > >> - { PCI_DEVICE(0x1269, 0x00ba), > >> + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00ba), > >> .driver_data = (kernel_ulong_t) &mhi_mv32_info }, > >> /* MV32-WB (Cinterion) */ > >> - { PCI_DEVICE(0x1269, 0x00bb), > >> + { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00bb), > >> .driver_data = (kernel_ulong_t) &mhi_mv32_info }, > >> { } > >> }; > >> -- > >> 2.17.1 > >> > > > >-- > >மணிவண்ணன் சதாசிவம் -- மணிவண்ணன் சதாசிவம் ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-07 7:40 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-11-02 2:44 [PATCH] bus: mhi: host: pci_generic: Add macro for some vids Slark Xiao 2022-11-03 12:50 ` Manivannan Sadhasivam 2022-11-07 2:21 ` Slark Xiao 2022-11-07 7:40 ` Manivannan Sadhasivam
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.