* Re: [PATCH v8 4/8] perf: imx_perf: refactor driver for imx93
From: Frank Li @ 2024-03-22 14:32 UTC (permalink / raw)
To: Xu Yang
Cc: will, mark.rutland, robh+dt, krzysztof.kozlowski+dt, conor+dt,
shawnguo, s.hauer, kernel, festevam, john.g.garry, jolsa,
namhyung, irogers, mike.leach, peterz, mingo, acme,
alexander.shishkin, adrian.hunter, linux-arm-kernel, devicetree,
linux-kernel, linux-perf-users, imx
In-Reply-To: <20240322063930.749126-4-xu.yang_2@nxp.com>
On Fri, Mar 22, 2024 at 02:39:26PM +0800, Xu Yang wrote:
> This driver is initinally used to support imx93 Soc and now it's time to
> add support for imx95 Soc. However, some macro definitions and events are
> different on these two Socs. For preparing imx95 supports, this will
> refactor driver for imx93.
>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
> ---
> Changes in v4:
> - new patch
> Changes in v5:
> - use is_visible to hide unwanted attributes as suggested by Will
> Changes in v6:
> - improve imx93_ddr_perf_monitor_config()
> Changes in v7:
> - improve imx93_ddr_perf_monitor_config() as suggested by Frank
> Changes in v8:
> - adjust is_visable() as suggested by Frank
> ---
> drivers/perf/fsl_imx9_ddr_perf.c | 106 ++++++++++++++++++++-----------
> 1 file changed, 68 insertions(+), 38 deletions(-)
>
> diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c
> index b728719b494c..011377c01dea 100644
> --- a/drivers/perf/fsl_imx9_ddr_perf.c
> +++ b/drivers/perf/fsl_imx9_ddr_perf.c
> @@ -11,14 +11,14 @@
> #include <linux/perf_event.h>
>
> /* Performance monitor configuration */
> -#define PMCFG1 0x00
> -#define PMCFG1_RD_TRANS_FILT_EN BIT(31)
> -#define PMCFG1_WR_TRANS_FILT_EN BIT(30)
> -#define PMCFG1_RD_BT_FILT_EN BIT(29)
> -#define PMCFG1_ID_MASK GENMASK(17, 0)
> +#define PMCFG1 0x00
> +#define MX93_PMCFG1_RD_TRANS_FILT_EN BIT(31)
> +#define MX93_PMCFG1_WR_TRANS_FILT_EN BIT(30)
> +#define MX93_PMCFG1_RD_BT_FILT_EN BIT(29)
> +#define MX93_PMCFG1_ID_MASK GENMASK(17, 0)
>
> -#define PMCFG2 0x04
> -#define PMCFG2_ID GENMASK(17, 0)
> +#define PMCFG2 0x04
> +#define MX93_PMCFG2_ID GENMASK(17, 0)
>
> /* Global control register affects all counters and takes priority over local control registers */
> #define PMGC0 0x40
> @@ -76,6 +76,11 @@ static const struct imx_ddr_devtype_data imx93_devtype_data = {
> .identifier = "imx93",
> };
>
> +static inline bool is_imx93(struct ddr_pmu *pmu)
> +{
> + return pmu->devtype_data == &imx93_devtype_data;
> +}
> +
> static const struct of_device_id imx_ddr_pmu_dt_ids[] = {
> {.compatible = "fsl,imx93-ddr-pmu", .data = &imx93_devtype_data},
> { /* sentinel */ }
> @@ -123,23 +128,36 @@ static const struct attribute_group ddr_perf_cpumask_attr_group = {
> .attrs = ddr_perf_cpumask_attrs,
> };
>
> +struct imx9_pmu_events_attr {
> + struct device_attribute attr;
> + u64 id;
> + const void *devtype_data;
> +};
> +
> static ssize_t ddr_pmu_event_show(struct device *dev,
> struct device_attribute *attr, char *page)
> {
> - struct perf_pmu_events_attr *pmu_attr;
> + struct imx9_pmu_events_attr *pmu_attr;
>
> - pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr);
> + pmu_attr = container_of(attr, struct imx9_pmu_events_attr, attr);
> return sysfs_emit(page, "event=0x%02llx\n", pmu_attr->id);
> }
>
> #define ID(counter, id) ((counter << CONFIG_COUNTER_OFFSET) | id)
>
> -#define IMX9_DDR_PMU_EVENT_ATTR(_name, _id) \
> - (&((struct perf_pmu_events_attr[]) { \
> +#define DDR_PMU_EVENT_ATTR_COMM(_name, _id, _data) \
> + (&((struct imx9_pmu_events_attr[]) { \
> { .attr = __ATTR(_name, 0444, ddr_pmu_event_show, NULL),\
> - .id = _id, } \
> + .id = _id, \
> + .devtype_data = _data, } \
> })[0].attr.attr)
>
> +#define IMX9_DDR_PMU_EVENT_ATTR(_name, _id) \
> + DDR_PMU_EVENT_ATTR_COMM(_name, _id, NULL)
> +
> +#define IMX93_DDR_PMU_EVENT_ATTR(_name, _id) \
> + DDR_PMU_EVENT_ATTR_COMM(_name, _id, &imx93_devtype_data)
> +
> static struct attribute *ddr_perf_events_attrs[] = {
> /* counter0 cycles event */
> IMX9_DDR_PMU_EVENT_ATTR(cycles, 0),
> @@ -185,7 +203,7 @@ static struct attribute *ddr_perf_events_attrs[] = {
> IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_6, ID(2, 70)),
> IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_7, ID(2, 71)),
> IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_empty, ID(2, 72)),
> - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_trans_filt, ID(2, 73)),
> + IMX93_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_trans_filt, ID(2, 73)), /* imx93 specific*/
>
> /* counter3 specific events */
> IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_0, ID(3, 64)),
> @@ -197,7 +215,7 @@ static struct attribute *ddr_perf_events_attrs[] = {
> IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_6, ID(3, 70)),
> IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_7, ID(3, 71)),
> IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_full, ID(3, 72)),
> - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_wr_trans_filt, ID(3, 73)),
> + IMX93_DDR_PMU_EVENT_ATTR(eddrtq_pm_wr_trans_filt, ID(3, 73)), /* imx93 specific*/
>
> /* counter4 specific events */
> IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_0, ID(4, 64)),
> @@ -209,7 +227,7 @@ static struct attribute *ddr_perf_events_attrs[] = {
> IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_6, ID(4, 70)),
> IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_7, ID(4, 71)),
> IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq2_rmw, ID(4, 72)),
> - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt, ID(4, 73)),
> + IMX93_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt, ID(4, 73)), /* imx93 specific*/
>
> /* counter5 specific events */
> IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_0, ID(5, 64)),
> @@ -244,9 +262,29 @@ static struct attribute *ddr_perf_events_attrs[] = {
> NULL,
> };
>
> +static umode_t
> +ddr_perf_events_attrs_is_visible(struct kobject *kobj,
> + struct attribute *attr, int unused)
> +{
> + struct pmu *pmu = dev_get_drvdata(kobj_to_dev(kobj));
> + struct ddr_pmu *ddr_pmu = to_ddr_pmu(pmu);
> + struct imx9_pmu_events_attr *eattr;
> +
> + eattr = container_of(attr, typeof(*eattr), attr.attr);
> +
> + if (!eattr->devtype_data)
> + return attr->mode;
> +
> + if (eattr->devtype_data != ddr_pmu->devtype_data)
> + return 0;
> +
> + return attr->mode;
> +}
> +
> static const struct attribute_group ddr_perf_events_attr_group = {
> .name = "events",
> .attrs = ddr_perf_events_attrs,
> + .is_visible = ddr_perf_events_attrs_is_visible,
> };
>
> PMU_FORMAT_ATTR(event, "config:0-15");
> @@ -368,36 +406,28 @@ static void ddr_perf_counter_local_config(struct ddr_pmu *pmu, int config,
> }
> }
>
> -static void ddr_perf_monitor_config(struct ddr_pmu *pmu, int event,
> - int counter, int axi_id, int axi_mask)
> +static void imx93_ddr_perf_monitor_config(struct ddr_pmu *pmu, int event,
> + int counter, int axi_id, int axi_mask)
> {
> u32 pmcfg1, pmcfg2;
> + u32 mask[] = { MX93_PMCFG1_RD_TRANS_FILT_EN,
> + MX93_PMCFG1_WR_TRANS_FILT_EN,
> + MX93_PMCFG1_RD_BT_FILT_EN };
>
> pmcfg1 = readl_relaxed(pmu->base + PMCFG1);
>
> - if (counter == 2 && event == 73)
> - pmcfg1 |= PMCFG1_RD_TRANS_FILT_EN;
> - else if (counter == 2 && event != 73)
> - pmcfg1 &= ~PMCFG1_RD_TRANS_FILT_EN;
> -
> - if (counter == 3 && event == 73)
> - pmcfg1 |= PMCFG1_WR_TRANS_FILT_EN;
> - else if (counter == 3 && event != 73)
> - pmcfg1 &= ~PMCFG1_WR_TRANS_FILT_EN;
> -
> - if (counter == 4 && event == 73)
> - pmcfg1 |= PMCFG1_RD_BT_FILT_EN;
> - else if (counter == 4 && event != 73)
> - pmcfg1 &= ~PMCFG1_RD_BT_FILT_EN;
> + if (counter >= 2 && counter <= 4)
> + pmcfg1 = event == 73 ? pmcfg1 | mask[counter - 2] :
> + pmcfg1 & ~mask[counter - 2];
>
> - pmcfg1 &= ~FIELD_PREP(PMCFG1_ID_MASK, 0x3FFFF);
> - pmcfg1 |= FIELD_PREP(PMCFG1_ID_MASK, axi_mask);
> - writel(pmcfg1, pmu->base + PMCFG1);
> + pmcfg1 &= ~FIELD_PREP(MX93_PMCFG1_ID_MASK, 0x3FFFF);
> + pmcfg1 |= FIELD_PREP(MX93_PMCFG1_ID_MASK, axi_mask);
> + writel_relaxed(pmcfg1, pmu->base + PMCFG1);
>
> pmcfg2 = readl_relaxed(pmu->base + PMCFG2);
> - pmcfg2 &= ~FIELD_PREP(PMCFG2_ID, 0x3FFFF);
> - pmcfg2 |= FIELD_PREP(PMCFG2_ID, axi_id);
> - writel(pmcfg2, pmu->base + PMCFG2);
> + pmcfg2 &= ~FIELD_PREP(MX93_PMCFG2_ID, 0x3FFFF);
> + pmcfg2 |= FIELD_PREP(MX93_PMCFG2_ID, axi_id);
> + writel_relaxed(pmcfg2, pmu->base + PMCFG2);
> }
>
> static void ddr_perf_event_update(struct perf_event *event)
> @@ -513,7 +543,7 @@ static int ddr_perf_event_add(struct perf_event *event, int flags)
> ddr_perf_event_start(event, flags);
>
> /* read trans, write trans, read beat */
> - ddr_perf_monitor_config(pmu, event_id, counter, cfg1, cfg2);
> + imx93_ddr_perf_monitor_config(pmu, event_id, counter, cfg1, cfg2);
>
> return 0;
> }
> --
> 2.34.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] dmaengine: owl: fix register access functions
From: Manivannan Sadhasivam @ 2024-03-22 14:32 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Vinod Koul, Andreas Färber, Nathan Chancellor, Arnd Bergmann,
Nick Desaulniers, Bill Wendling, Justin Stitt,
Uwe Kleine-König, Randy Dunlap, Rob Herring, Zhang Jianhua,
dmaengine, linux-arm-kernel, linux-actions, linux-kernel, llvm
In-Reply-To: <20240322132116.906475-1-arnd@kernel.org>
On Fri, Mar 22, 2024 at 02:21:07PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When building with 'make W=1', clang notices that the computed register
> values are never actually written back but instead the wrong variable
> is set:
>
> drivers/dma/owl-dma.c:244:6: error: variable 'regval' set but not used [-Werror,-Wunused-but-set-variable]
> 244 | u32 regval;
> | ^
> drivers/dma/owl-dma.c:268:6: error: variable 'regval' set but not used [-Werror,-Wunused-but-set-variable]
> 268 | u32 regval;
> | ^
>
> Change these to what was most likely intended.
>
Wow... Thanks for spotting. Well thanks to Clang also ;)
> Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org # 4.19
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
- Mani
> ---
> drivers/dma/owl-dma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/owl-dma.c b/drivers/dma/owl-dma.c
> index 4e76c4ec2d39..e001f4f7aa64 100644
> --- a/drivers/dma/owl-dma.c
> +++ b/drivers/dma/owl-dma.c
> @@ -250,7 +250,7 @@ static void pchan_update(struct owl_dma_pchan *pchan, u32 reg,
> else
> regval &= ~val;
>
> - writel(val, pchan->base + reg);
> + writel(regval, pchan->base + reg);
> }
>
> static void pchan_writel(struct owl_dma_pchan *pchan, u32 reg, u32 data)
> @@ -274,7 +274,7 @@ static void dma_update(struct owl_dma *od, u32 reg, u32 val, bool state)
> else
> regval &= ~val;
>
> - writel(val, od->base + reg);
> + writel(regval, od->base + reg);
> }
>
> static void dma_writel(struct owl_dma *od, u32 reg, u32 data)
> --
> 2.39.2
>
--
மணிவண்ணன் சதாசிவம்
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [v10,20/27] drm/connector: hdmi: Add Infoframes generation
From: Sui Jingfeng @ 2024-03-22 14:30 UTC (permalink / raw)
To: Maxime Ripard
Cc: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Daniel Vetter,
Jonathan Corbet, Sandy Huang, Heiko Stübner, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Hans Verkuil, Sebastian Wick,
Ville Syrjälä, dri-devel, linux-arm-kernel, linux-doc,
linux-kernel, linux-media, linux-rockchip, linux-sunxi
In-Reply-To: <20240322-steadfast-tanuki-from-mars-b5ea5f@houat>
Hi,
On 2024/3/22 20:31, Maxime Ripard wrote:
> On Fri, Mar 22, 2024 at 07:13:54PM +0800, Sui Jingfeng wrote:
>> Hi,
>>
>>
>> On 2024/3/22 18:31, Maxime Ripard wrote:
>>> Which default config are you talking about? This compiles fine with all
>>> drm-misc defconfig, x86 defconfig and allmodconfig.
>> The drm_hdmi_avi_infoframe_colorimetry() function is belong to the drm_display_helper.ko
>> kernel module, it get called from hdmi_generate_avi_infoframe() in drm_atomic_state_helper.c.
>> While drm_atomic_state_helper.c belongs to drm_kms_helper.ko. Therefore drm_kms_helper.ko
>> is dependent on drm_display_helper.ko implicitly. So we probably should select it.
> Right. I was asking which config are you using to generate that build error
I'm using the arch/riscv/configs/defconfig, with the following module de-selected.
CONFIG_DRM_RADEON
CONFIG_DRM_NOUVEAU
CONFIG_DRM_SUN4I
> Maxime
--
Best regards,
Sui
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v2] KVM: arm64: Add KVM_CAP to control WFx trapping
From: Quentin Perret @ 2024-03-22 14:24 UTC (permalink / raw)
To: Colton Lewis
Cc: kvm, Marc Zyngier, Oliver Upton, James Morse, Suzuki K Poulose,
Zenghui Yu, Catalin Marinas, Will Deacon, Paolo Bonzini,
Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Daniel Bristot de Oliveira, Valentin Schneider, linux-arm-kernel,
kvmarm, linux-kernel
In-Reply-To: <20240319164341.1674863-1-coltonlewis@google.com>
On Tuesday 19 Mar 2024 at 16:43:41 (+0000), Colton Lewis wrote:
> Add a KVM_CAP to control WFx (WFI or WFE) trapping based on scheduler
> runqueue depth. This is so they can be passed through if the runqueue
> is shallow or the CPU has support for direct interrupt injection. They
> may be always trapped by setting this value to 0. Technically this
> means traps will be cleared when the runqueue depth is 0, but that
> implies nothing is running anyway so there is no reason to care. The
> default value is 1 to preserve previous behavior before adding this
> option.
I recently discovered that this was enabled by default, but it's not
obvious to me everyone will want this enabled, so I'm in favour of
figuring out a way to turn it off (in fact we might want to make this
feature opt in as the status quo used to be to always trap).
There are a few potential issues I see with having this enabled:
- a lone vcpu thread on a CPU will completely screw up the host
scheduler's load tracking metrics if the vCPU actually spends a
significant amount of time in WFI (the PELT signal will no longer
be a good proxy for "how much CPU time does this task need");
- the scheduler's decision will impact massively the behaviour of the
vcpu task itself. Co-scheduling a task with a vcpu task (or not) will
impact massively the perceived behaviour of the vcpu task in a way
that is entirely unpredictable to the scheduler;
- while the above problems might be OK for some users, I don't think
this will always be true, e.g. when running on big.LITTLE systems the
above sounds nightmare-ish;
- the guest spending long periods of time in WFI prevents the host from
being able to enter deeper idle states, which will impact power very
negatively;
And probably a whole bunch of other things.
> Think about his option as a threshold. The instruction will be trapped
> if the runqueue depth is higher than the threshold.
So talking about the exact interface, I'm not sure exposing this to
userspace is really appropriate. The current rq depth is next to
impossible for userspace to control well.
My gut feeling tells me we might want to gate all of this on
PREEMPT_FULL instead, since PREEMPT_FULL is pretty much a way to say
"I'm willing to give up scheduler tracking accuracy to gain throughput
when I've got a task running alone on a CPU". Thoughts?
Thanks,
Quentin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* RE: [PATCH v2] ARM: unwind: improve unwinders for noreturn case
From: David Laight @ 2024-03-22 14:16 UTC (permalink / raw)
To: 'Russell King'
Cc: Ard Biesheuvel, Jiangfeng Xiao, arnd@arndb.de,
keescook@chromium.org, haibo.li@mediatek.com,
angelogioacchino.delregno@collabora.com, amergnat@baylibre.com,
akpm@linux-foundation.org, dave.hansen@linux.intel.com,
douzhaolei@huawei.com, gustavoars@kernel.org, jpoimboe@kernel.org,
kepler.chenxin@huawei.com, kirill.shutemov@linux.intel.com,
linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org,
nixiaoming@huawei.com, peterz@infradead.org, wangbing6@huawei.com,
wangfangpeng1@huawei.com, jannh@google.com, willy@infradead.org
In-Reply-To: <Zf1UyxlDf/oCjXxr@shell.armlinux.org.uk>
...
> Whereas we already provide an abort() function because iirc the
> compiler used to emit branches to that due to noreturn functions. If
> correct, there's previous convention for doing this - and abort() is
> still exists in the kernel and in userspace since it's part of ANSI
> C. This would be a more reliable and portable solution, but probably
> not for embedded platforms - and that's probably why it got removed.
Wouldn't you want it to do a 'bl abort' so that you could do a backtrace
to find out which 'noreturn' function had returned?
But that leaves you with another 'noreturn' function that you have
difficulty generating a backtrace from.
So you'd need a compiler option to specify what to put there.
I'd suspect linux would like something that generates an 'undefined
instruction' trap - since that would be expected to fault with the
saved PC pointing to the instruction itself (but architectures may vary).
'One size' definitely doesn't 'fit all' :-)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v4 10/11] pinctrl: pinctrl-tps6594: Add TPS65224 PMIC pinctrl and GPIO
From: Bhargav Raviprakash @ 2024-03-22 14:10 UTC (permalink / raw)
To: jpanis
Cc: arnd, bhargav.r, broonie, conor+dt, devicetree, eblanc, gregkh,
kristo, krzysztof.kozlowski+dt, lee, lgirdwood, linus.walleij,
linux-arm-kernel, linux-gpio, linux-kernel, m.nirmaladevi, nm,
robh+dt, vigneshr
In-Reply-To: <b473d940-0301-472d-90f0-297da6815377@baylibre.com>
On Fri, 22 Mar 2024 09:06:13 +0100, Julien Panis wrote:
> On 3/21/24 12:10, Julien Panis wrote:
> > On 3/20/24 11:25, Bhargav Raviprakash wrote:
> >> From: Nirmala Devi Mal Nadar <m.nirmaladevi@ltts.com>
> >>
> >> Add support for TPS65224 pinctrl and GPIOs to TPS6594 driver as they have
> >> significant functional overlap.
> >> TPS65224 PMIC has 6 GPIOS which can be configured as GPIO or other
> >> dedicated device functions.
> >>
> >> Signed-off-by: Nirmala Devi Mal Nadar <m.nirmaladevi@ltts.com>
> >> Signed-off-by: Bhargav Raviprakash <bhargav.r@ltts.com>
> >> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> >
> > With this patch, an issue is observed on am62a:
> >
> > root@am62axx-evm:~# dmesg | grep tps
> > ...
> > [ 12.122631] tps6594-pinctrl tps6594-pinctrl.2.auto: error -EINVAL: Couldn't register
> > gpio_regmap driver
> > [ 12.133216] tps6594-pinctrl: probe of tps6594-pinctrl.2.auto failed with error -22
> >
> > Without this patch, the issue disappears. Do you observe
> > the same result with your am62p ?
> >
> > Julien Panis
> >
>
> Hi Barghav.
>
> I found the issue in your patch.
>
> In probe function you handle TPS652254 and TPS6594 'switch' cases,
> but you do not handle TPS6593 and LP8764 cases.
> Since AM62A uses a TPS6593, it currently falls in the default case,
> and as a result probe fails.
>
> Please fix it for v5.
>
> Julien Panis
Hi Julien,
Thanks for pointing it out.
We added support for TPS6594 alone as mentioned in header description "Pinmux and GPIO driver for tps6594 PMIC".
TPS6594 and TPS6593 has similar gpio map, however gpio map for LP8764 is different from TPS6594 / TPS6593.
Regards,
Bhargav
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 1/2] ASoC: dt-bindings: fsl-asoc-card: convert to YAML
From: Rob Herring @ 2024-03-22 13:58 UTC (permalink / raw)
To: Shengjiu Wang
Cc: lgirdwood, broonie, krzysztof.kozlowski+dt, conor+dt,
shengjiu.wang, linux-sound, devicetree, linux-kernel, shawnguo,
s.hauer, kernel, festevam, imx, linux-arm-kernel
In-Reply-To: <1711102406-8399-2-git-send-email-shengjiu.wang@nxp.com>
On Fri, Mar 22, 2024 at 06:13:25PM +0800, Shengjiu Wang wrote:
> Convert the fsl-asoc-card binding to YAML.
>
> In order to pass the checking, add some used compatible
> string from devicetree.
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
> .../bindings/sound/fsl-asoc-card.txt | 117 -----------
> .../bindings/sound/fsl-asoc-card.yaml | 196 ++++++++++++++++++
> 2 files changed, 196 insertions(+), 117 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> create mode 100644 Documentation/devicetree/bindings/sound/fsl-asoc-card.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> deleted file mode 100644
> index 4e8dbc5abfd1..000000000000
> --- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
> +++ /dev/null
> @@ -1,117 +0,0 @@
> -Freescale Generic ASoC Sound Card with ASRC support
> -
> -The Freescale Generic ASoC Sound Card can be used, ideally, for all Freescale
> -SoCs connecting with external CODECs.
> -
> -The idea of this generic sound card is a bit like ASoC Simple Card. However,
> -for Freescale SoCs (especially those released in recent years), most of them
> -have ASRC (Documentation/devicetree/bindings/sound/fsl,asrc.txt) inside. And
> -this is a specific feature that might be painstakingly controlled and merged
> -into the Simple Card.
> -
> -So having this generic sound card allows all Freescale SoC users to benefit
> -from the simplification of a new card support and the capability of the wide
> -sample rates support through ASRC.
> -
> -Note: The card is initially designed for those sound cards who use AC'97, I2S
> - and PCM DAI formats. However, it'll be also possible to support those non
> - AC'97/I2S/PCM type sound cards, such as S/PDIF audio and HDMI audio, as
> - long as the driver has been properly upgraded.
> -
> -
> -The compatible list for this generic sound card currently:
> - "fsl,imx-audio-ac97"
> -
> - "fsl,imx-audio-cs42888"
> -
> - "fsl,imx-audio-cs427x"
> - (compatible with CS4271 and CS4272)
> -
> - "fsl,imx-audio-wm8962"
> -
> - "fsl,imx-audio-sgtl5000"
> - (compatible with Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt)
> -
> - "fsl,imx-audio-wm8960"
> -
> - "fsl,imx-audio-mqs"
> -
> - "fsl,imx-audio-wm8524"
> -
> - "fsl,imx-audio-tlv320aic32x4"
> -
> - "fsl,imx-audio-tlv320aic31xx"
> -
> - "fsl,imx-audio-si476x"
> -
> - "fsl,imx-audio-wm8958"
> -
> - "fsl,imx-audio-nau8822"
> -
> -Required properties:
> -
> - - compatible : Contains one of entries in the compatible list.
> -
> - - model : The user-visible name of this sound complex
> -
> - - audio-cpu : The phandle of an CPU DAI controller
> -
> - - audio-codec : The phandle of an audio codec
> -
> -Optional properties:
> -
> - - audio-asrc : The phandle of ASRC. It can be absent if there's no
> - need to add ASRC support via DPCM.
> -
> - - audio-routing : A list of the connections between audio components.
> - Each entry is a pair of strings, the first being the
> - connection's sink, the second being the connection's
> - source. There're a few pre-designed board connectors:
> - * Line Out Jack
> - * Line In Jack
> - * Headphone Jack
> - * Mic Jack
> - * Ext Spk
> - * AMIC (stands for Analog Microphone Jack)
> - * DMIC (stands for Digital Microphone Jack)
> -
> - Note: The "Mic Jack" and "AMIC" are redundant while
> - coexisting in order to support the old bindings
> - of wm8962 and sgtl5000.
> -
> - - hp-det-gpio : The GPIO that detect headphones are plugged in
> - - mic-det-gpio : The GPIO that detect microphones are plugged in
> - - bitclock-master : Indicates dai-link bit clock master; for details see simple-card.yaml.
> - - frame-master : Indicates dai-link frame master; for details see simple-card.yaml.
> - - dai-format : audio format, for details see simple-card.yaml.
> - - frame-inversion : dai-link uses frame clock inversion, for details see simple-card.yaml.
> - - bitclock-inversion : dai-link uses bit clock inversion, for details see simple-card.yaml.
> - - mclk-id : main clock id, specific for each card configuration.
> -
> -Optional unless SSI is selected as a CPU DAI:
> -
> - - mux-int-port : The internal port of the i.MX audio muxer (AUDMUX)
> -
> - - mux-ext-port : The external port of the i.MX audio muxer
> -
> -Example:
> -sound-cs42888 {
> - compatible = "fsl,imx-audio-cs42888";
> - model = "cs42888-audio";
> - audio-cpu = <&esai>;
> - audio-asrc = <&asrc>;
> - audio-codec = <&cs42888>;
> - audio-routing =
> - "Line Out Jack", "AOUT1L",
> - "Line Out Jack", "AOUT1R",
> - "Line Out Jack", "AOUT2L",
> - "Line Out Jack", "AOUT2R",
> - "Line Out Jack", "AOUT3L",
> - "Line Out Jack", "AOUT3R",
> - "Line Out Jack", "AOUT4L",
> - "Line Out Jack", "AOUT4R",
> - "AIN1L", "Line In Jack",
> - "AIN1R", "Line In Jack",
> - "AIN2L", "Line In Jack",
> - "AIN2R", "Line In Jack";
> -};
> diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.yaml b/Documentation/devicetree/bindings/sound/fsl-asoc-card.yaml
> new file mode 100644
> index 000000000000..48051655230d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.yaml
> @@ -0,0 +1,196 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/fsl-asoc-card.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale Generic ASoC Sound Card with ASRC support
> +
> +description:
> + The Freescale Generic ASoC Sound Card can be used, ideally,
> + for all Freescale SoCs connecting with external CODECs.
> +
> + The idea of this generic sound card is a bit like ASoC Simple Card.
> + However, for Freescale SoCs (especially those released in recent years),
> + most of them have ASRC
> + (Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml) inside. And
> + this is a specific feature that might be painstakingly controlled and
> + merged into the Simple Card.
> +
> + So having this generic sound card allows all Freescale SoC users to
> + benefit from the simplification of a new card support and the capability
> + of the wide sample rates support through ASRC.
> +
> + Note, The card is initially designed for those sound cards who use AC'97, I2S
> + and PCM DAI formats. However, it'll be also possible to support those non
> + AC'97/I2S/PCM type sound cards, such as S/PDIF audio and HDMI audio, as
> + long as the driver has been properly upgraded.
> +
> +maintainers:
> + - Shengjiu Wang <shengjiu.wang@nxp.com>
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - enum:
> + - fsl,imx-sgtl5000
> + - fsl,imx53-cpuvo-sgtl5000
> + - fsl,imx51-babbage-sgtl5000
> + - fsl,imx53-m53evk-sgtl5000
> + - fsl,imx53-qsb-sgtl5000
> + - fsl,imx53-voipac-sgtl5000
> + - fsl,imx6-armadeus-sgtl5000
> + - fsl,imx6-rex-sgtl5000
> + - fsl,imx6-sabreauto-cs42888
> + - fsl,imx6-wandboard-sgtl5000
> + - fsl,imx6dl-nit6xlite-sgtl5000
> + - fsl,imx6q-ba16-sgtl5000
> + - fsl,imx6q-nitrogen6_max-sgtl5000
> + - fsl,imx6q-nitrogen6_som2-sgtl5000
> + - fsl,imx6q-nitrogen6x-sgtl5000
> + - fsl,imx6q-sabrelite-sgtl5000
> + - fsl,imx6q-sabresd-wm8962
> + - fsl,imx6q-udoo-ac97
> + - fsl,imx6q-ventana-sgtl5000
> + - fsl,imx6sl-evk-wm8962
> + - fsl,imx6sx-sdb-mqs
> + - fsl,imx6sx-sdb-wm8962
> + - fsl,imx7d-evk-wm8960
> + - karo,tx53-audio-sgtl5000
> + - tq,imx53-mba53-sgtl5000
None of these were documented before. It's fine to add all these in this
patch, but please state in the commit message what missing or incorrect
things you added in the schema.
> + - enum:
> + - fsl,imx-audio-ac97
> + - fsl,imx-audio-cs42888
> + - fsl,imx-audio-mqs
> + - fsl,imx-audio-sgtl5000
> + - fsl,imx-audio-wm8960
> + - fsl,imx-audio-wm8962
> + - items:
> + - enum:
> + - fsl,imx-audio-ac97
> + - fsl,imx-audio-cs42888
> + - fsl,imx-audio-cs427x
> + - fsl,imx-audio-mqs
> + - fsl,imx-audio-nau8822
> + - fsl,imx-audio-sgtl5000
> + - fsl,imx-audio-si476x
> + - fsl,imx-audio-tlv320aic31xx
> + - fsl,imx-audio-tlv320aic32x4
> + - fsl,imx-audio-wm8524
> + - fsl,imx-audio-wm8960
> + - fsl,imx-audio-wm8962
> + - fsl,imx-audio-wm8958
> +
> + model:
> + $ref: /schemas/types.yaml#/definitions/string
> + description: The user-visible name of this sound complex
> +
> + audio-asrc:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + The phandle of ASRC. It can be absent if there's no
> + need to add ASRC support via DPCM.
> +
> + audio-codec:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: The phandle of an audio codec
> +
> + audio-cpu:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: The phandle of an CPU DAI controller
> +
> + audio-routing:
> + $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> + description:
> + A list of the connections between audio components. Each entry is a
> + pair of strings, the first being the connection's sink, the second
> + being the connection's source. There're a few pre-designed board
> + connectors.
> + * Line Out Jack
> + * Line In Jack
> + * Headphone Jack
> + * Mic Jack
> + * Ext Spk
> + * AMIC (stands for Analog Microphone Jack)
> + * DMIC (stands for Digital Microphone Jack)
> + Note, The "Mic Jack" and "AMIC" are redundant while coexisting in
> + order to support the old bindings of wm8962 and sgtl5000.
Please list the strings out as schema:
minItems: 2
items:
enum:
- "Line Out Jack"
...
> +
> + hp-det-gpio:
> + maxItems: 1
> + description: The GPIO that detect headphones are plugged in
deprecated: true
> +
> + hp-det-gpios:
> + maxItems: 1
> + description: The GPIO that detect headphones are plugged in
> +
> + mic-det-gpio:
> + maxItems: 1
> + description: The GPIO that detect microphones are plugged in
deprecated: true
> +
> + mic-det-gpios:
> + maxItems: 1
> + description: The GPIO that detect microphones are plugged in
> +
> + bitclock-master:
> + description: Indicates dai-link bit clock master; for details see simple-card.yaml.
Drop the prose reference and add:
$ref: simple-card.yaml#/definitions/bitclock-master
Otherwise, bitclock-master could be anything.
And similar for the rest.
> +
> + frame-master:
> + description: Indicates dai-link frame master; for details see simple-card.yaml.
> +
> + dai-format:
> + description: audio format, for details see simple-card.yaml.
> +
> + frame-inversion:
> + description: dai-link uses frame clock inversion, for details see simple-card.yaml.
> +
> + bitclock-inversion:
> + description: dai-link uses bit clock inversion, for details see simple-card.yaml.
> +
> + mclk-id:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: main clock id, specific for each card configuration.
> +
> + mux-int-port:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [1, 2, 7]
> + description: The internal port of the i.MX audio muxer (AUDMUX)
> +
> + mux-ext-port:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [3, 4, 5, 6]
> + description: The external port of the i.MX audio muxer
> +
> + ssi-controller:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: The phandle of an CPU DAI controller
> +
> +required:
> + - compatible
> + - model
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + sound-cs42888 {
> + compatible = "fsl,imx-audio-cs42888";
> + model = "cs42888-audio";
> + audio-cpu = <&esai>;
> + audio-asrc = <&asrc>;
> + audio-codec = <&cs42888>;
> + audio-routing =
> + "Line Out Jack", "AOUT1L",
> + "Line Out Jack", "AOUT1R",
> + "Line Out Jack", "AOUT2L",
> + "Line Out Jack", "AOUT2R",
> + "Line Out Jack", "AOUT3L",
> + "Line Out Jack", "AOUT3R",
> + "Line Out Jack", "AOUT4L",
> + "Line Out Jack", "AOUT4R",
> + "AIN1L", "Line In Jack",
> + "AIN1R", "Line In Jack",
> + "AIN2L", "Line In Jack",
> + "AIN2R", "Line In Jack";
> + };
> --
> 2.34.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 47/64] i2c: rk3x: reword according to newest specification
From: Heiko Stübner @ 2024-03-22 13:51 UTC (permalink / raw)
To: linux-i2c, Wolfram Sang
Cc: Wolfram Sang, Andi Shyti, linux-arm-kernel, linux-rockchip,
linux-kernel
In-Reply-To: <20240322132619.6389-48-wsa+renesas@sang-engineering.com>
Am Freitag, 22. März 2024, 14:25:40 CET schrieb Wolfram Sang:
> Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
> specifications and replace "master/slave" with more appropriate terms.
> They are also more specific because we distinguish now between a remote
> entity ("client") and a local one ("target").
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
> ---
> drivers/i2c/busses/i2c-rk3x.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
> index 086fdf262e7b..01febd886bdd 100644
> --- a/drivers/i2c/busses/i2c-rk3x.c
> +++ b/drivers/i2c/busses/i2c-rk3x.c
> @@ -28,8 +28,8 @@
> /* Register Map */
> #define REG_CON 0x00 /* control register */
> #define REG_CLKDIV 0x04 /* clock divisor register */
> -#define REG_MRXADDR 0x08 /* slave address for REGISTER_TX */
> -#define REG_MRXRADDR 0x0c /* slave register address for REGISTER_TX */
> +#define REG_MRXADDR 0x08 /* client address for REGISTER_TX */
> +#define REG_MRXRADDR 0x0c /* client register address for REGISTER_TX */
> #define REG_MTXCNT 0x10 /* number of bytes to be transmitted */
> #define REG_MRXCNT 0x14 /* number of bytes to be received */
> #define REG_IEN 0x18 /* interrupt enable */
> @@ -68,8 +68,8 @@ enum {
> /* REG_IEN/REG_IPD bits */
> #define REG_INT_BTF BIT(0) /* a byte was transmitted */
> #define REG_INT_BRF BIT(1) /* a byte was received */
> -#define REG_INT_MBTF BIT(2) /* master data transmit finished */
> -#define REG_INT_MBRF BIT(3) /* master data receive finished */
> +#define REG_INT_MBTF BIT(2) /* host data transmit finished */
> +#define REG_INT_MBRF BIT(3) /* host data receive finished */
> #define REG_INT_START BIT(4) /* START condition generated */
> #define REG_INT_STOP BIT(5) /* STOP condition generated */
> #define REG_INT_NAKRCV BIT(6) /* NACK received */
> @@ -184,7 +184,7 @@ struct rk3x_i2c_soc_data {
> * @wait: the waitqueue to wait for i2c transfer
> * @busy: the condition for the event to wait for
> * @msg: current i2c message
> - * @addr: addr of i2c slave device
> + * @addr: addr of i2c client device
> * @mode: mode of i2c transfer
> * @is_last_msg: flag determines whether it is the last msg in this transfer
> * @state: state of i2c transfer
> @@ -979,7 +979,7 @@ static int rk3x_i2c_setup(struct rk3x_i2c *i2c, struct i2c_msg *msgs, int num)
> /*
> * The I2C adapter can issue a small (len < 4) write packet before
> * reading. This speeds up SMBus-style register reads.
> - * The MRXADDR/MRXRADDR hold the slave address and the slave register
> + * The MRXADDR/MRXRADDR hold the client address and the client register
> * address in this case.
> */
>
> @@ -1016,7 +1016,7 @@ static int rk3x_i2c_setup(struct rk3x_i2c *i2c, struct i2c_msg *msgs, int num)
> addr |= 1; /* set read bit */
>
> /*
> - * We have to transmit the slave addr first. Use
> + * We have to transmit the client addr first. Use
> * MOD_REGISTER_TX for that purpose.
> */
> i2c->mode = REG_CON_MOD_REGISTER_TX;
> @@ -1162,8 +1162,8 @@ static u32 rk3x_i2c_func(struct i2c_adapter *adap)
> }
>
> static const struct i2c_algorithm rk3x_i2c_algorithm = {
> - .master_xfer = rk3x_i2c_xfer,
> - .master_xfer_atomic = rk3x_i2c_xfer_polling,
> + .xfer = rk3x_i2c_xfer,
> + .xfer_atomic = rk3x_i2c_xfer_polling,
> .functionality = rk3x_i2c_func,
> };
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] arm64: dts: exynos: gs101: define all PERIC USI nodes
From: Tudor Ambarus @ 2024-03-22 13:39 UTC (permalink / raw)
To: Krzysztof Kozlowski, peter.griffin, robh+dt,
krzysztof.kozlowski+dt, conor+dt
Cc: alim.akhtar, linux-arm-kernel, linux-samsung-soc, devicetree,
linux-kernel, andre.draszik, willmcvicker, kernel-team
In-Reply-To: <073e5ef5-2a2e-4300-93d6-e25552276e13@linaro.org>
Hi, Krzysztof!
On 3/8/24 16:45, Krzysztof Kozlowski wrote:
> On 07/03/2024 14:59, Tudor Ambarus wrote:
>> Universal Serial Interface (USI) supports three types of serial
>> interface such as UART, SPI and I2C. Each protocol works independently.
>> USI can be configured to work as one of these protocols. Define all the
>> USI nodes from the PERIC blocks (USI0-14), in all their possible
>> configurations. These blocks have the TX/RX FIFO depth of 64 bytes.
>>
>> Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
>> ---
>> Please note that:
>> - google,gs101-spi compatible was queued through the SPI tree:
>> https://lore.kernel.org/linux-arm-kernel/170742731537.2266792.3851016361229293846.b4-ty@kernel.org/
>> - SPI dma properties were marked as not requiered. Queued through the
>> SPI tree:
>> https://lore.kernel.org/linux-spi/170967132774.228925.1759895846287455970.b4-ty@kernel.org/
>>
>> arch/arm64/boot/dts/exynos/google/gs101.dtsi | 782 +++++++++++++++++++
>> 1 file changed, 782 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
>> index ee65ed9d2cfc..d7ecfbc7e440 100644
>> --- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi
>> +++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
>> @@ -373,6 +373,398 @@ pinctrl_peric0: pinctrl@10840000 {
cut
>> +
>> + hsi2c_1: i2c@10900000 {
>> + compatible = "google,gs101-hsi2c",
>> + "samsung,exynosautov9-hsi2c";
>> + reg = <0x10900000 0xc0>;
>> + interrupts = <GIC_SPI 635 IRQ_TYPE_LEVEL_HIGH 0>;
>
> I wonder why we use four cells in GIC...
>
>> + #address-cells = <1>;
>> + #size-cells = <0>;
I'd like to respin this patch. Any preference on coding style for
#address-cells and #size-cells? I guess they shall be above ranges
property if present.
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&hsi2c1_bus>;
>
> Please reverse two lines, first pinctrl-0 then pinctrl-names. I know we
Ok.
> did not follow this convention till now, but at least new code can be
> correct. Also clocks should be before pinctrl, so we keep some sort of
> alphabetical order.
Ok.
I guess the order shall be:
1. compatible
2. reg
3. #address-cells (if applicable)
#size-cells (if applicable)
4. ranges (if applicable)
5. Standard/common properties ordered alphabetically (ex. clocks,
interrupts, pinctrl)
6. vendor-specific properties
7. status (if applicable)
Please let me know if you have other preference. Thanks!
ta
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] dmaengine: owl: fix register access functions
From: Peter Korsgaard @ 2024-03-22 13:36 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Vinod Koul, Andreas Färber, Manivannan Sadhasivam,
Nathan Chancellor, Arnd Bergmann, Nick Desaulniers, Bill Wendling,
Justin Stitt, Uwe Kleine-König, Randy Dunlap, Rob Herring,
Zhang Jianhua, dmaengine, linux-arm-kernel, linux-actions,
linux-kernel, llvm
In-Reply-To: <20240322132116.906475-1-arnd@kernel.org>
>>>>> "Arnd" == Arnd Bergmann <arnd@kernel.org> writes:
> From: Arnd Bergmann <arnd@arndb.de>
> When building with 'make W=1', clang notices that the computed register
> values are never actually written back but instead the wrong variable
> is set:
> drivers/dma/owl-dma.c:244:6: error: variable 'regval' set but not used [-Werror,-Wunused-but-set-variable]
> 244 | u32 regval;
> | ^
> drivers/dma/owl-dma.c:268:6: error: variable 'regval' set but not used [-Werror,-Wunused-but-set-variable]
> 268 | u32 regval;
> | ^
> Change these to what was most likely intended.
> Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Good catch!
Reviewed-by: Peter Korsgaard <peter@korsgaard.com>
--
Bye, Peter Korsgaard
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v3 12/12] mm/gup: Handle hugetlb in the generic follow_page_mask code
From: Jason Gunthorpe @ 2024-03-22 13:30 UTC (permalink / raw)
To: peterx
Cc: linux-mm, linux-kernel, linuxppc-dev, Michael Ellerman,
Christophe Leroy, Matthew Wilcox, Rik van Riel, Lorenzo Stoakes,
Axel Rasmussen, Yang Shi, John Hubbard, linux-arm-kernel,
Kirill A . Shutemov, Andrew Jones, Vlastimil Babka, Mike Rapoport,
Andrew Morton, Muchun Song, Christoph Hellwig, linux-riscv,
James Houghton, David Hildenbrand, Andrea Arcangeli,
Aneesh Kumar K . V, Mike Kravetz
In-Reply-To: <20240321220802.679544-13-peterx@redhat.com>
On Thu, Mar 21, 2024 at 06:08:02PM -0400, peterx@redhat.com wrote:
> A quick performance test on an aarch64 VM on M1 chip shows 15% degrade over
> a tight loop of slow gup after the path switched. That shouldn't be a
> problem because slow-gup should not be a hot path for GUP in general: when
> page is commonly present, fast-gup will already succeed, while when the
> page is indeed missing and require a follow up page fault, the slow gup
> degrade will probably buried in the fault paths anyway. It also explains
> why slow gup for THP used to be very slow before 57edfcfd3419 ("mm/gup:
> accelerate thp gup even for "pages != NULL"") lands, the latter not part of
> a performance analysis but a side benefit. If the performance will be a
> concern, we can consider handle CONT_PTE in follow_page().
I think this is probably fine for the moment, at least for this
series, as CONT_PTE is still very new.
But it will need to be optimized. "slow" GUP is the only GUP that is
used by FOLL_LONGTERM and it still needs to be optimized because you
can't assume a FOLL_LONGTERM user will be hitting the really slow
fault path. There are enough important cases where it is just reading
already populted page tables, and these days, often with large folios.
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH 59/64] i2c: uniphier-f: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Andi Shyti, Kunihiko Hayashi, Masami Hiramatsu,
linux-arm-kernel, linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-uniphier-f.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c
index dbc91c7c3788..f075c83a81b9 100644
--- a/drivers/i2c/busses/i2c-uniphier-f.c
+++ b/drivers/i2c/busses/i2c-uniphier-f.c
@@ -12,15 +12,15 @@
#include <linux/platform_device.h>
#define UNIPHIER_FI2C_CR 0x00 /* control register */
-#define UNIPHIER_FI2C_CR_MST BIT(3) /* master mode */
+#define UNIPHIER_FI2C_CR_MST BIT(3) /* host mode */
#define UNIPHIER_FI2C_CR_STA BIT(2) /* start condition */
#define UNIPHIER_FI2C_CR_STO BIT(1) /* stop condition */
#define UNIPHIER_FI2C_CR_NACK BIT(0) /* do not return ACK */
#define UNIPHIER_FI2C_DTTX 0x04 /* TX FIFO */
-#define UNIPHIER_FI2C_DTTX_CMD BIT(8) /* send command (slave addr) */
+#define UNIPHIER_FI2C_DTTX_CMD BIT(8) /* send command (client addr) */
#define UNIPHIER_FI2C_DTTX_RD BIT(0) /* read transaction */
#define UNIPHIER_FI2C_DTRX 0x04 /* RX FIFO */
-#define UNIPHIER_FI2C_SLAD 0x0c /* slave address */
+#define UNIPHIER_FI2C_SLAD 0x0c /* client address */
#define UNIPHIER_FI2C_CYC 0x10 /* clock cycle control */
#define UNIPHIER_FI2C_LCTL 0x14 /* clock low period control */
#define UNIPHIER_FI2C_SSUT 0x18 /* restart/stop setup time control */
@@ -96,7 +96,7 @@ static void uniphier_fi2c_fill_txfifo(struct uniphier_fi2c_priv *priv,
int fifo_space = UNIPHIER_FI2C_FIFO_SIZE;
/*
- * TX-FIFO stores slave address in it for the first access.
+ * TX-FIFO stores client address in it for the first access.
* Decrement the counter.
*/
if (first)
@@ -252,7 +252,7 @@ static void uniphier_fi2c_tx_init(struct uniphier_fi2c_priv *priv, u16 addr,
/* do not use TX byte counter */
writel(0, priv->membase + UNIPHIER_FI2C_TBC);
- /* set slave address */
+ /* set client address */
writel(UNIPHIER_FI2C_DTTX_CMD | addr << 1,
priv->membase + UNIPHIER_FI2C_DTTX);
/*
@@ -288,7 +288,7 @@ static void uniphier_fi2c_rx_init(struct uniphier_fi2c_priv *priv, u16 addr)
uniphier_fi2c_set_irqs(priv);
- /* set slave address with RD bit */
+ /* set client address with RD bit */
writel(UNIPHIER_FI2C_DTTX_CMD | UNIPHIER_FI2C_DTTX_RD | addr << 1,
priv->membase + UNIPHIER_FI2C_DTTX);
}
@@ -310,7 +310,7 @@ static void uniphier_fi2c_recover(struct uniphier_fi2c_priv *priv)
i2c_recover_bus(&priv->adap);
}
-static int uniphier_fi2c_master_xfer_one(struct i2c_adapter *adap,
+static int uniphier_fi2c_xfer_one(struct i2c_adapter *adap,
struct i2c_msg *msg, bool repeat,
bool stop)
{
@@ -340,7 +340,7 @@ static int uniphier_fi2c_master_xfer_one(struct i2c_adapter *adap,
uniphier_fi2c_tx_init(priv, msg->addr, repeat);
/*
- * For a repeated START condition, writing a slave address to the FIFO
+ * For a repeated START condition, writing a client address to the FIFO
* kicks the controller. So, the UNIPHIER_FI2C_CR register should be
* written only for a non-repeated START condition.
*/
@@ -404,7 +404,7 @@ static int uniphier_fi2c_check_bus_busy(struct i2c_adapter *adap)
return 0;
}
-static int uniphier_fi2c_master_xfer(struct i2c_adapter *adap,
+static int uniphier_fi2c_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{
struct i2c_msg *msg, *emsg = msgs + num;
@@ -419,7 +419,7 @@ static int uniphier_fi2c_master_xfer(struct i2c_adapter *adap,
/* Emit STOP if it is the last message or I2C_M_STOP is set. */
bool stop = (msg + 1 == emsg) || (msg->flags & I2C_M_STOP);
- ret = uniphier_fi2c_master_xfer_one(adap, msg, repeat, stop);
+ ret = uniphier_fi2c_xfer_one(adap, msg, repeat, stop);
if (ret)
return ret;
@@ -435,7 +435,7 @@ static u32 uniphier_fi2c_functionality(struct i2c_adapter *adap)
}
static const struct i2c_algorithm uniphier_fi2c_algo = {
- .master_xfer = uniphier_fi2c_master_xfer,
+ .xfer = uniphier_fi2c_xfer,
.functionality = uniphier_fi2c_functionality,
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 55/64] i2c: sun6i-p2wi: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Andi Shyti, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, linux-arm-kernel, linux-sunxi, linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-sun6i-p2wi.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/i2c/busses/i2c-sun6i-p2wi.c b/drivers/i2c/busses/i2c-sun6i-p2wi.c
index 85e035e7a1d7..bb01746738b1 100644
--- a/drivers/i2c/busses/i2c-sun6i-p2wi.c
+++ b/drivers/i2c/busses/i2c-sun6i-p2wi.c
@@ -10,7 +10,7 @@
* The P2WI controller looks like an SMBus controller which only supports byte
* data transfers. But, it differs from standard SMBus protocol on several
* aspects:
- * - it supports only one slave device, and thus drop the address field
+ * - it supports only one client device, and thus drop the address field
* - it adds a parity bit every 8bits of data
* - only one read access is required to read a byte (instead of a write
* followed by a read access in standard SMBus protocol)
@@ -88,7 +88,7 @@ struct p2wi {
void __iomem *regs;
struct clk *clk;
struct reset_control *rstc;
- int slave_addr;
+ int client_addr;
};
static irqreturn_t p2wi_interrupt(int irq, void *dev_id)
@@ -121,7 +121,7 @@ static int p2wi_smbus_xfer(struct i2c_adapter *adap, u16 addr,
struct p2wi *p2wi = i2c_get_adapdata(adap);
unsigned long dlen = P2WI_DLEN_DATA_LENGTH(1);
- if (p2wi->slave_addr >= 0 && addr != p2wi->slave_addr) {
+ if (p2wi->client_addr >= 0 && addr != p2wi->client_addr) {
dev_err(&adap->dev, "invalid P2WI address\n");
return -EINVAL;
}
@@ -188,7 +188,7 @@ static int p2wi_probe(struct platform_device *pdev)
unsigned long parent_clk_freq;
u32 clk_freq = I2C_MAX_STANDARD_MODE_FREQ;
struct p2wi *p2wi;
- u32 slave_addr;
+ u32 client_addr;
int clk_div;
int irq;
int ret;
@@ -207,7 +207,7 @@ static int p2wi_probe(struct platform_device *pdev)
}
if (of_get_child_count(np) > 1) {
- dev_err(dev, "P2WI only supports one slave device\n");
+ dev_err(dev, "P2WI only supports one client device\n");
return -EINVAL;
}
@@ -215,24 +215,24 @@ static int p2wi_probe(struct platform_device *pdev)
if (!p2wi)
return -ENOMEM;
- p2wi->slave_addr = -1;
+ p2wi->client_addr = -1;
/*
* Authorize a p2wi node without any children to be able to use an
* i2c-dev from userpace.
- * In this case the slave_addr is set to -1 and won't be checked when
+ * In this case the client_addr is set to -1 and won't be checked when
* launching a P2WI transfer.
*/
childnp = of_get_next_available_child(np, NULL);
if (childnp) {
- ret = of_property_read_u32(childnp, "reg", &slave_addr);
+ ret = of_property_read_u32(childnp, "reg", &client_addr);
if (ret) {
- dev_err(dev, "invalid slave address on node %pOF\n",
+ dev_err(dev, "invalid client address on node %pOF\n",
childnp);
return -EINVAL;
}
- p2wi->slave_addr = slave_addr;
+ p2wi->client_addr = client_addr;
}
p2wi->regs = devm_platform_ioremap_resource(pdev, 0);
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 60/64] i2c: uniphier: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Andi Shyti, Kunihiko Hayashi, Masami Hiramatsu,
linux-arm-kernel, linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-uniphier.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-uniphier.c b/drivers/i2c/busses/i2c-uniphier.c
index 854ac25b5862..24fa15c92845 100644
--- a/drivers/i2c/busses/i2c-uniphier.c
+++ b/drivers/i2c/busses/i2c-uniphier.c
@@ -17,13 +17,13 @@
#define UNIPHIER_I2C_DTRM_NACK BIT(8) /* do not return ACK */
#define UNIPHIER_I2C_DTRM_RD BIT(0) /* read transaction */
#define UNIPHIER_I2C_DREC 0x04 /* RX register */
-#define UNIPHIER_I2C_DREC_MST BIT(14) /* 1 = master, 0 = slave */
+#define UNIPHIER_I2C_DREC_MST BIT(14) /* 1 = host, 0 = target */
#define UNIPHIER_I2C_DREC_TX BIT(13) /* 1 = transmit, 0 = receive */
#define UNIPHIER_I2C_DREC_STS BIT(12) /* stop condition detected */
#define UNIPHIER_I2C_DREC_LRB BIT(11) /* no ACK */
#define UNIPHIER_I2C_DREC_LAB BIT(9) /* arbitration lost */
#define UNIPHIER_I2C_DREC_BBN BIT(8) /* bus not busy */
-#define UNIPHIER_I2C_MYAD 0x08 /* slave address */
+#define UNIPHIER_I2C_MYAD 0x08 /* target address */
#define UNIPHIER_I2C_CLK 0x0c /* clock frequency control */
#define UNIPHIER_I2C_BRST 0x10 /* bus reset */
#define UNIPHIER_I2C_BRST_FOEN BIT(1) /* normal operation */
@@ -154,7 +154,7 @@ static int uniphier_i2c_stop(struct i2c_adapter *adap)
UNIPHIER_I2C_DTRM_NACK);
}
-static int uniphier_i2c_master_xfer_one(struct i2c_adapter *adap,
+static int uniphier_i2c_xfer_one(struct i2c_adapter *adap,
struct i2c_msg *msg, bool stop)
{
bool is_read = msg->flags & I2C_M_RD;
@@ -213,7 +213,7 @@ static int uniphier_i2c_check_bus_busy(struct i2c_adapter *adap)
return 0;
}
-static int uniphier_i2c_master_xfer(struct i2c_adapter *adap,
+static int uniphier_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{
struct i2c_msg *msg, *emsg = msgs + num;
@@ -227,7 +227,7 @@ static int uniphier_i2c_master_xfer(struct i2c_adapter *adap,
/* Emit STOP if it is the last message or I2C_M_STOP is set. */
bool stop = (msg + 1 == emsg) || (msg->flags & I2C_M_STOP);
- ret = uniphier_i2c_master_xfer_one(adap, msg, stop);
+ ret = uniphier_i2c_xfer_one(adap, msg, stop);
if (ret)
return ret;
}
@@ -241,7 +241,7 @@ static u32 uniphier_i2c_functionality(struct i2c_adapter *adap)
}
static const struct i2c_algorithm uniphier_i2c_algo = {
- .master_xfer = uniphier_i2c_master_xfer,
+ .xfer = uniphier_i2c_xfer,
.functionality = uniphier_i2c_functionality,
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 54/64] i2c: stm32f4: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Pierre-Yves MORDRET, Alain Volmat, Andi Shyti,
Maxime Coquelin, Alexandre Torgue, linux-stm32, linux-arm-kernel,
linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-stm32f4.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-stm32f4.c b/drivers/i2c/busses/i2c-stm32f4.c
index 859ac0cf7f6c..297f2ace6b94 100644
--- a/drivers/i2c/busses/i2c-stm32f4.c
+++ b/drivers/i2c/busses/i2c-stm32f4.c
@@ -95,7 +95,7 @@
/**
* struct stm32f4_i2c_msg - client specific data
- * @addr: 8-bit slave addr, including r/w bit
+ * @addr: 8-bit client addr, including r/w bit
* @count: number of bytes to be transferred
* @buf: data buffer
* @result: result of the transfer
@@ -480,7 +480,7 @@ static void stm32f4_i2c_handle_rx_done(struct stm32f4_i2c_dev *i2c_dev)
/**
* stm32f4_i2c_handle_rx_addr() - Handle address matched interrupt in case of
- * master receiver
+ * host receiver
* @i2c_dev: Controller's private data
*/
static void stm32f4_i2c_handle_rx_addr(struct stm32f4_i2c_dev *i2c_dev)
@@ -643,7 +643,7 @@ static irqreturn_t stm32f4_i2c_isr_error(int irq, void *data)
/*
* Acknowledge failure:
- * In master transmitter mode a Stop must be generated by software
+ * In host transmitter mode a Stop must be generated by software
*/
if (status & STM32F4_I2C_SR1_AF) {
if (!(msg->addr & I2C_M_RD)) {
@@ -749,7 +749,7 @@ static u32 stm32f4_i2c_func(struct i2c_adapter *adap)
}
static const struct i2c_algorithm stm32f4_i2c_algo = {
- .master_xfer = stm32f4_i2c_xfer,
+ .xfer = stm32f4_i2c_xfer,
.functionality = stm32f4_i2c_func,
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 47/64] i2c: rk3x: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Heiko Stuebner, Andi Shyti, linux-arm-kernel,
linux-rockchip, linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-rk3x.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
index 086fdf262e7b..01febd886bdd 100644
--- a/drivers/i2c/busses/i2c-rk3x.c
+++ b/drivers/i2c/busses/i2c-rk3x.c
@@ -28,8 +28,8 @@
/* Register Map */
#define REG_CON 0x00 /* control register */
#define REG_CLKDIV 0x04 /* clock divisor register */
-#define REG_MRXADDR 0x08 /* slave address for REGISTER_TX */
-#define REG_MRXRADDR 0x0c /* slave register address for REGISTER_TX */
+#define REG_MRXADDR 0x08 /* client address for REGISTER_TX */
+#define REG_MRXRADDR 0x0c /* client register address for REGISTER_TX */
#define REG_MTXCNT 0x10 /* number of bytes to be transmitted */
#define REG_MRXCNT 0x14 /* number of bytes to be received */
#define REG_IEN 0x18 /* interrupt enable */
@@ -68,8 +68,8 @@ enum {
/* REG_IEN/REG_IPD bits */
#define REG_INT_BTF BIT(0) /* a byte was transmitted */
#define REG_INT_BRF BIT(1) /* a byte was received */
-#define REG_INT_MBTF BIT(2) /* master data transmit finished */
-#define REG_INT_MBRF BIT(3) /* master data receive finished */
+#define REG_INT_MBTF BIT(2) /* host data transmit finished */
+#define REG_INT_MBRF BIT(3) /* host data receive finished */
#define REG_INT_START BIT(4) /* START condition generated */
#define REG_INT_STOP BIT(5) /* STOP condition generated */
#define REG_INT_NAKRCV BIT(6) /* NACK received */
@@ -184,7 +184,7 @@ struct rk3x_i2c_soc_data {
* @wait: the waitqueue to wait for i2c transfer
* @busy: the condition for the event to wait for
* @msg: current i2c message
- * @addr: addr of i2c slave device
+ * @addr: addr of i2c client device
* @mode: mode of i2c transfer
* @is_last_msg: flag determines whether it is the last msg in this transfer
* @state: state of i2c transfer
@@ -979,7 +979,7 @@ static int rk3x_i2c_setup(struct rk3x_i2c *i2c, struct i2c_msg *msgs, int num)
/*
* The I2C adapter can issue a small (len < 4) write packet before
* reading. This speeds up SMBus-style register reads.
- * The MRXADDR/MRXRADDR hold the slave address and the slave register
+ * The MRXADDR/MRXRADDR hold the client address and the client register
* address in this case.
*/
@@ -1016,7 +1016,7 @@ static int rk3x_i2c_setup(struct rk3x_i2c *i2c, struct i2c_msg *msgs, int num)
addr |= 1; /* set read bit */
/*
- * We have to transmit the slave addr first. Use
+ * We have to transmit the client addr first. Use
* MOD_REGISTER_TX for that purpose.
*/
i2c->mode = REG_CON_MOD_REGISTER_TX;
@@ -1162,8 +1162,8 @@ static u32 rk3x_i2c_func(struct i2c_adapter *adap)
}
static const struct i2c_algorithm rk3x_i2c_algorithm = {
- .master_xfer = rk3x_i2c_xfer,
- .master_xfer_atomic = rk3x_i2c_xfer_polling,
+ .xfer = rk3x_i2c_xfer,
+ .xfer_atomic = rk3x_i2c_xfer_polling,
.functionality = rk3x_i2c_func,
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 40/64] i2c: owl: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Andi Shyti, Andreas Färber,
Manivannan Sadhasivam, linux-arm-kernel, linux-actions,
linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-owl.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/busses/i2c-owl.c b/drivers/i2c/busses/i2c-owl.c
index 777f1a0278c7..cb90e1b2775c 100644
--- a/drivers/i2c/busses/i2c-owl.c
+++ b/drivers/i2c/busses/i2c-owl.c
@@ -172,7 +172,7 @@ static void owl_i2c_xfer_data(struct owl_i2c_dev *i2c_dev)
i2c_dev->err = 0;
- /* Handle NACK from slave */
+ /* Handle NACK from client */
fifostat = readl(i2c_dev->base + OWL_I2C_REG_FIFOSTAT);
if (fifostat & OWL_I2C_FIFOSTAT_RNB) {
i2c_dev->err = -ENXIO;
@@ -302,7 +302,7 @@ static int owl_i2c_xfer_common(struct i2c_adapter *adap, struct i2c_msg *msgs,
OWL_I2C_CTL_IRQE, !atomic);
/*
- * Select: FIFO enable, Master mode, Stop enable, Data count enable,
+ * Select: FIFO enable, host mode, Stop enable, Data count enable,
* Send start bit
*/
i2c_cmd = OWL_I2C_CMD_SECL | OWL_I2C_CMD_MSS | OWL_I2C_CMD_SE |
@@ -314,7 +314,7 @@ static int owl_i2c_xfer_common(struct i2c_adapter *adap, struct i2c_msg *msgs,
i2c_cmd |= OWL_I2C_CMD_AS(msgs[0].len + 1) |
OWL_I2C_CMD_SAS(1) | OWL_I2C_CMD_RBE;
- /* Write slave address */
+ /* Write client address */
addr = i2c_8bit_addr_from_msg(&msgs[0]);
writel(addr, i2c_dev->base + OWL_I2C_REG_TXDAT);
@@ -420,8 +420,8 @@ static int owl_i2c_xfer_atomic(struct i2c_adapter *adap,
}
static const struct i2c_algorithm owl_i2c_algorithm = {
- .master_xfer = owl_i2c_xfer,
- .master_xfer_atomic = owl_i2c_xfer_atomic,
+ .xfer = owl_i2c_xfer,
+ .xfer_atomic = owl_i2c_xfer_atomic,
.functionality = owl_i2c_func,
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 53/64] i2c: st: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Patrice Chotard, Andi Shyti, linux-arm-kernel,
linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-st.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
index ce2333408904..9bd45ae83c0c 100644
--- a/drivers/i2c/busses/i2c-st.c
+++ b/drivers/i2c/busses/i2c-st.c
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2013 STMicroelectronics
*
- * I2C master mode controller driver, used in STMicroelectronics devices.
+ * I2C host controller driver, used in STMicroelectronics devices.
*
* Author: Maxime Coquelin <maxime.coquelin@st.com>
*/
@@ -150,7 +150,7 @@ struct st_i2c_timings {
/**
* struct st_i2c_client - client specific data
- * @addr: 8-bit slave addr, including r/w bit
+ * @addr: 8-bit client addr, including r/w bit
* @count: number of bytes to be transfered
* @xfered: number of bytes already transferred
* @buf: data buffer
@@ -647,7 +647,7 @@ static int st_i2c_xfer_msg(struct st_i2c_dev *i2c_dev, struct i2c_msg *msg,
{
struct st_i2c_client *c = &i2c_dev->client;
u32 ctl, i2c, it;
- unsigned long timeout;
+ unsigned long time_left;
int ret;
c->addr = i2c_8bit_addr_from_msg(msg);
@@ -667,7 +667,7 @@ static int st_i2c_xfer_msg(struct st_i2c_dev *i2c_dev, struct i2c_msg *msg,
i2c |= SSC_I2C_ACKG;
st_i2c_set_bits(i2c_dev->base + SSC_I2C, i2c);
- /* Write slave address */
+ /* Write client address */
st_i2c_write_tx_fifo(i2c_dev, c->addr);
/* Pre-fill Tx fifo with data in case of write */
@@ -685,15 +685,12 @@ static int st_i2c_xfer_msg(struct st_i2c_dev *i2c_dev, struct i2c_msg *msg,
st_i2c_set_bits(i2c_dev->base + SSC_I2C, SSC_I2C_STRTG);
}
- timeout = wait_for_completion_timeout(&i2c_dev->complete,
+ time_left = wait_for_completion_timeout(&i2c_dev->complete,
i2c_dev->adap.timeout);
ret = c->result;
- if (!timeout) {
- dev_err(i2c_dev->dev, "Write to slave 0x%x timed out\n",
- c->addr);
+ if (!time_left)
ret = -ETIMEDOUT;
- }
i2c = SSC_I2C_STOPG | SSC_I2C_REPSTRTG;
st_i2c_clr_bits(i2c_dev->base + SSC_I2C, i2c);
@@ -769,7 +766,7 @@ static u32 st_i2c_func(struct i2c_adapter *adap)
}
static const struct i2c_algorithm st_i2c_algo = {
- .master_xfer = st_i2c_xfer,
+ .xfer = st_i2c_xfer,
.functionality = st_i2c_func,
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 37/64] i2c: mt7621: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Stefan Roese, Andi Shyti, Matthias Brugger,
AngeloGioacchino Del Regno, linux-kernel, linux-arm-kernel,
linux-mediatek
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-mt7621.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mt7621.c b/drivers/i2c/busses/i2c-mt7621.c
index 81d46169bc1f..c567a2cf4a90 100644
--- a/drivers/i2c/busses/i2c-mt7621.c
+++ b/drivers/i2c/busses/i2c-mt7621.c
@@ -117,26 +117,26 @@ static int mtk_i2c_check_ack(struct mtk_i2c *i2c, u32 expected)
return ((ack & ack_expected) == ack_expected) ? 0 : -ENXIO;
}
-static int mtk_i2c_master_start(struct mtk_i2c *i2c)
+static int mtk_i2c_host_start(struct mtk_i2c *i2c)
{
iowrite32(SM0CTL1_START | SM0CTL1_TRI, i2c->base + REG_SM0CTL1_REG);
return mtk_i2c_wait_idle(i2c);
}
-static int mtk_i2c_master_stop(struct mtk_i2c *i2c)
+static int mtk_i2c_host_stop(struct mtk_i2c *i2c)
{
iowrite32(SM0CTL1_STOP | SM0CTL1_TRI, i2c->base + REG_SM0CTL1_REG);
return mtk_i2c_wait_idle(i2c);
}
-static int mtk_i2c_master_cmd(struct mtk_i2c *i2c, u32 cmd, int page_len)
+static int mtk_i2c_host_cmd(struct mtk_i2c *i2c, u32 cmd, int page_len)
{
iowrite32(cmd | SM0CTL1_TRI | SM0CTL1_PGLEN(page_len),
i2c->base + REG_SM0CTL1_REG);
return mtk_i2c_wait_idle(i2c);
}
-static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
+static int mtk_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
int num)
{
struct mtk_i2c *i2c;
@@ -157,7 +157,7 @@ static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
goto err_timeout;
/* start sequence */
- ret = mtk_i2c_master_start(i2c);
+ ret = mtk_i2c_host_start(i2c);
if (ret)
goto err_timeout;
@@ -169,14 +169,14 @@ static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
if (pmsg->flags & I2C_M_RD)
addr |= 1;
iowrite32(addr, i2c->base + REG_SM0D0_REG);
- ret = mtk_i2c_master_cmd(i2c, SM0CTL1_WRITE, 2);
+ ret = mtk_i2c_host_cmd(i2c, SM0CTL1_WRITE, 2);
if (ret)
goto err_timeout;
} else {
/* 7 bits address */
addr = i2c_8bit_addr_from_msg(pmsg);
iowrite32(addr, i2c->base + REG_SM0D0_REG);
- ret = mtk_i2c_master_cmd(i2c, SM0CTL1_WRITE, 1);
+ ret = mtk_i2c_host_cmd(i2c, SM0CTL1_WRITE, 1);
if (ret)
goto err_timeout;
}
@@ -202,7 +202,7 @@ static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
cmd = SM0CTL1_WRITE;
}
- ret = mtk_i2c_master_cmd(i2c, cmd, page_len);
+ ret = mtk_i2c_host_cmd(i2c, cmd, page_len);
if (ret)
goto err_timeout;
@@ -222,7 +222,7 @@ static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
}
}
- ret = mtk_i2c_master_stop(i2c);
+ ret = mtk_i2c_host_stop(i2c);
if (ret)
goto err_timeout;
@@ -230,7 +230,7 @@ static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
return i;
err_ack:
- ret = mtk_i2c_master_stop(i2c);
+ ret = mtk_i2c_host_stop(i2c);
if (ret)
goto err_timeout;
return -ENXIO;
@@ -247,7 +247,7 @@ static u32 mtk_i2c_func(struct i2c_adapter *a)
}
static const struct i2c_algorithm mtk_i2c_algo = {
- .master_xfer = mtk_i2c_master_xfer,
+ .xfer = mtk_i2c_xfer,
.functionality = mtk_i2c_func,
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 31/64] i2c: lpc2k: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Vladimir Zapolskiy, Andi Shyti, linux-arm-kernel,
linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-lpc2k.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-lpc2k.c b/drivers/i2c/busses/i2c-lpc2k.c
index e3660333e91c..f0cb217973c1 100644
--- a/drivers/i2c/busses/i2c-lpc2k.c
+++ b/drivers/i2c/busses/i2c-lpc2k.c
@@ -50,7 +50,7 @@
/*
* 26 possible I2C status codes, but codes applicable only
- * to master are listed here and used in this driver
+ * to host mode are listed here and used in this driver
*/
enum {
M_BUS_ERROR = 0x00,
@@ -157,7 +157,7 @@ static void i2c_lpc2k_pump_msg(struct lpc2k_i2c *i2c)
break;
case MR_ADDR_R_ACK:
- /* Receive first byte from slave */
+ /* Receive first byte from client */
if (i2c->msg->len == 1) {
/* Last byte, return NACK */
writel(LPC24XX_AA, i2c->base + LPC24XX_I2CONCLR);
@@ -196,7 +196,7 @@ static void i2c_lpc2k_pump_msg(struct lpc2k_i2c *i2c)
}
/*
- * One pre-last data input, send NACK to tell the slave that
+ * One pre-last data input, send NACK to tell the client that
* this is going to be the last data byte to be transferred.
*/
if (i2c->msg_idx >= i2c->msg->len - 2) {
@@ -338,7 +338,7 @@ static u32 i2c_lpc2k_functionality(struct i2c_adapter *adap)
}
static const struct i2c_algorithm i2c_lpc2k_algorithm = {
- .master_xfer = i2c_lpc2k_xfer,
+ .xfer = i2c_lpc2k_xfer,
.functionality = i2c_lpc2k_functionality,
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 26/64] i2c: imx-lpi2c: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Dong Aisheng, Andi Shyti, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, imx, linux-arm-kernel,
linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index 6d72e4e126dd..337a55804463 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -262,7 +262,7 @@ static int lpi2c_imx_config(struct lpi2c_imx_struct *lpi2c_imx)
return 0;
}
-static int lpi2c_imx_master_enable(struct lpi2c_imx_struct *lpi2c_imx)
+static int lpi2c_imx_host_enable(struct lpi2c_imx_struct *lpi2c_imx)
{
unsigned int temp;
int ret;
@@ -292,7 +292,7 @@ static int lpi2c_imx_master_enable(struct lpi2c_imx_struct *lpi2c_imx)
return ret;
}
-static int lpi2c_imx_master_disable(struct lpi2c_imx_struct *lpi2c_imx)
+static int lpi2c_imx_host_disable(struct lpi2c_imx_struct *lpi2c_imx)
{
u32 temp;
@@ -459,7 +459,7 @@ static int lpi2c_imx_xfer(struct i2c_adapter *adapter,
unsigned int temp;
int i, result;
- result = lpi2c_imx_master_enable(lpi2c_imx);
+ result = lpi2c_imx_host_enable(lpi2c_imx);
if (result)
return result;
@@ -502,7 +502,7 @@ static int lpi2c_imx_xfer(struct i2c_adapter *adapter,
result = -EIO;
disable:
- lpi2c_imx_master_disable(lpi2c_imx);
+ lpi2c_imx_host_disable(lpi2c_imx);
dev_dbg(&lpi2c_imx->adapter.dev, "<%s> exit with: %s: %d\n", __func__,
(result < 0) ? "error" : "success msg",
@@ -554,7 +554,7 @@ static u32 lpi2c_imx_func(struct i2c_adapter *adapter)
}
static const struct i2c_algorithm lpi2c_imx_algo = {
- .master_xfer = lpi2c_imx_xfer,
+ .xfer = lpi2c_imx_xfer,
.functionality = lpi2c_imx_func,
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 15/64] i2c: davinci: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Bartosz Golaszewski, Andi Shyti, linux-arm-kernel,
linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-davinci.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index 02b3b1160fb0..1884d77934e9 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -263,7 +263,7 @@ static int i2c_davinci_init(struct davinci_i2c_dev *dev)
/* compute clock dividers */
i2c_davinci_calc_clk_dividers(dev);
- /* Respond at reserved "SMBus Host" slave address" (and zero);
+ /* Respond at reserved "SMBus Host" client address" (and zero);
* we seem to have no option to not respond...
*/
davinci_i2c_write_reg(dev, DAVINCI_I2C_OAR_REG, DAVINCI_I2C_OWN_ADDRESS);
@@ -407,7 +407,7 @@ static int i2c_davinci_wait_bus_not_busy(struct davinci_i2c_dev *dev)
}
/*
- * Low level master read/write transaction. This function is called
+ * Low level host read/write transaction. This function is called
* from i2c_davinci_xfer.
*/
static int
@@ -428,7 +428,7 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)
if (pdata->bus_delay)
udelay(pdata->bus_delay);
- /* set the slave address */
+ /* set the client address */
davinci_i2c_write_reg(dev, DAVINCI_I2C_SAR_REG, msg->addr);
dev->buf = msg->buf;
@@ -440,10 +440,9 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)
reinit_completion(&dev->cmd_complete);
dev->cmd_err = 0;
- /* Take I2C out of reset and configure it as master */
+ /* Take I2C out of reset and configure it as host */
flag = DAVINCI_I2C_MDR_IRS | DAVINCI_I2C_MDR_MST;
- /* if the slave address is ten bit address, enable XA bit */
if (msg->flags & I2C_M_TEN)
flag |= DAVINCI_I2C_MDR_XA;
if (!(msg->flags & I2C_M_RD))
@@ -688,7 +687,7 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
break;
case DAVINCI_I2C_IVR_AAS:
- dev_dbg(dev->dev, "Address as slave interrupt\n");
+ dev_dbg(dev->dev, "Address as client interrupt\n");
break;
default:
@@ -745,7 +744,7 @@ static inline void i2c_davinci_cpufreq_deregister(struct davinci_i2c_dev *dev)
#endif
static const struct i2c_algorithm i2c_davinci_algo = {
- .master_xfer = i2c_davinci_xfer,
+ .xfer = i2c_davinci_xfer,
.functionality = i2c_davinci_func,
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 16/64] i2c: digicolor: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Andi Shyti, Baruch Siach, linux-arm-kernel,
linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-digicolor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c
index 3462f2bc0fa8..0d777f5c6b41 100644
--- a/drivers/i2c/busses/i2c-digicolor.c
+++ b/drivers/i2c/busses/i2c-digicolor.c
@@ -281,7 +281,7 @@ static u32 dc_i2c_func(struct i2c_adapter *adap)
}
static const struct i2c_algorithm dc_i2c_algorithm = {
- .master_xfer = dc_i2c_xfer,
+ .xfer = dc_i2c_xfer,
.functionality = dc_i2c_func,
};
@@ -372,5 +372,5 @@ static struct platform_driver dc_i2c_driver = {
module_platform_driver(dc_i2c_driver);
MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");
-MODULE_DESCRIPTION("Conexant Digicolor I2C master driver");
+MODULE_DESCRIPTION("Conexant Digicolor I2C controller driver");
MODULE_LICENSE("GPL v2");
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 11/64] i2c: cadence: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Michal Simek, Andi Shyti, linux-arm-kernel,
linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-cadence.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c
index 4bb7d6756947..91085e719689 100644
--- a/drivers/i2c/busses/i2c-cadence.c
+++ b/drivers/i2c/busses/i2c-cadence.c
@@ -808,7 +808,7 @@ static int cdns_i2c_process_msg(struct cdns_i2c *id, struct i2c_msg *msg,
}
/**
- * cdns_i2c_master_xfer - The main i2c transfer function
+ * cdns_i2c_xfer - The main i2c transfer function
* @adap: pointer to the i2c adapter driver instance
* @msgs: pointer to the i2c message structure
* @num: the number of messages to transfer
@@ -817,7 +817,7 @@ static int cdns_i2c_process_msg(struct cdns_i2c *id, struct i2c_msg *msg,
*
* Return: number of msgs processed on success, negative error otherwise
*/
-static int cdns_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
+static int cdns_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
int num)
{
int ret, count;
@@ -947,7 +947,7 @@ static u32 cdns_i2c_func(struct i2c_adapter *adap)
}
#if IS_ENABLED(CONFIG_I2C_SLAVE)
-static int cdns_reg_slave(struct i2c_client *slave)
+static int cdns_reg_target(struct i2c_client *slave)
{
int ret;
struct cdns_i2c *id = container_of(slave->adapter, struct cdns_i2c,
@@ -972,7 +972,7 @@ static int cdns_reg_slave(struct i2c_client *slave)
return 0;
}
-static int cdns_unreg_slave(struct i2c_client *slave)
+static int cdns_unreg_target(struct i2c_client *slave)
{
struct cdns_i2c *id = container_of(slave->adapter, struct cdns_i2c,
adap);
@@ -990,11 +990,11 @@ static int cdns_unreg_slave(struct i2c_client *slave)
#endif
static const struct i2c_algorithm cdns_i2c_algo = {
- .master_xfer = cdns_i2c_master_xfer,
+ .xfer = cdns_i2c_xfer,
.functionality = cdns_i2c_func,
#if IS_ENABLED(CONFIG_I2C_SLAVE)
- .reg_slave = cdns_reg_slave,
- .unreg_slave = cdns_unreg_slave,
+ .reg_target = cdns_reg_target,
+ .unreg_target = cdns_unreg_target,
#endif
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 09/64] i2c: bcm2835: reword according to newest specification
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Andi Shyti, Florian Fainelli,
Broadcom internal kernel review list, Ray Jui, Scott Branden,
linux-rpi-kernel, linux-arm-kernel, linux-kernel
In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com>
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-bcm2835.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c
index b92de1944221..62776e7fc586 100644
--- a/drivers/i2c/busses/i2c-bcm2835.c
+++ b/drivers/i2c/busses/i2c-bcm2835.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * BCM2835 master mode driver
+ * BCM2835 host controller mode driver
*/
#include <linux/clk.h>
@@ -25,7 +25,7 @@
#define BCM2835_I2C_DEL 0x18
/*
* 16-bit field for the number of SCL cycles to wait after rising SCL
- * before deciding the slave is not responding. 0 disables the
+ * before deciding the client is not responding. 0 disables the
* timeout detection.
*/
#define BCM2835_I2C_CLKT 0x1c
@@ -223,7 +223,7 @@ static void bcm2835_drain_rxfifo(struct bcm2835_i2c_dev *i2c_dev)
/*
* Repeated Start Condition (Sr)
* The BCM2835 ARM Peripherals datasheet mentions a way to trigger a Sr when it
- * talks about reading from a slave with 10 bit address. This is achieved by
+ * talks about reading from a client with 10 bit address. This is achieved by
* issuing a write, poll the I2CS.TA flag and wait for it to be set, and then
* issue a read.
* A comment in https://github.com/raspberrypi/linux/issues/254 shows how the
@@ -391,7 +391,7 @@ static u32 bcm2835_i2c_func(struct i2c_adapter *adap)
}
static const struct i2c_algorithm bcm2835_i2c_algo = {
- .master_xfer = bcm2835_i2c_xfer,
+ .xfer = bcm2835_i2c_xfer,
.functionality = bcm2835_i2c_func,
};
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox