Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH v28 26/32] ALSA: usb-audio: Introduce USB SND platform op callbacks
From: Wesley Cheng @ 2024-09-25  0:59 UTC (permalink / raw)
  To: srinivas.kandagatla, mathias.nyman, perex, conor+dt,
	dmitry.torokhov, corbet, broonie, lgirdwood, tiwai, krzk+dt,
	pierre-louis.bossart, Thinh.Nguyen, bgoswami, robh, gregkh
  Cc: linux-kernel, devicetree, linux-sound, linux-input, linux-usb,
	linux-arm-msm, linux-doc, alsa-devel, Wesley Cheng
In-Reply-To: <20240925010000.2231406-1-quic_wcheng@quicinc.com>

Allow for different platforms to be notified on USB SND connect/disconnect
sequences.  This allows for platform USB SND modules to properly initialize
and populate internal structures with references to the USB SND chip
device.

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
 sound/usb/card.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
 sound/usb/card.h | 10 ++++++++++
 2 files changed, 59 insertions(+)

diff --git a/sound/usb/card.c b/sound/usb/card.c
index 1f9dfcd8f336..326292f37841 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -118,6 +118,42 @@ MODULE_PARM_DESC(skip_validation, "Skip unit descriptor validation (default: no)
 static DEFINE_MUTEX(register_mutex);
 static struct snd_usb_audio *usb_chip[SNDRV_CARDS];
 static struct usb_driver usb_audio_driver;
+static struct snd_usb_platform_ops *platform_ops;
+
+/*
+ * Register platform specific operations that will be notified on events
+ * which occur in USB SND.  The platform driver can utilize this path to
+ * enable features, such as USB audio offloading, which allows for audio data
+ * to be queued by an audio DSP.
+ *
+ * Only one set of platform operations can be registered to USB SND.  The
+ * platform register operation is protected by the register_mutex.
+ */
+int snd_usb_register_platform_ops(struct snd_usb_platform_ops *ops)
+{
+	guard(mutex)(&register_mutex);
+	if (platform_ops)
+		return -EEXIST;
+
+	platform_ops = ops;
+	return 0;
+}
+EXPORT_SYMBOL_GPL(snd_usb_register_platform_ops);
+
+/*
+ * Unregisters the current set of platform operations.  This allows for
+ * a new set to be registered if required.
+ *
+ * The platform unregister operation is protected by the register_mutex.
+ */
+int snd_usb_unregister_platform_ops(void)
+{
+	guard(mutex)(&register_mutex);
+	platform_ops = NULL;
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(snd_usb_unregister_platform_ops);
 
 /*
  * Checks to see if requested audio profile, i.e sample rate, # of
@@ -946,7 +982,11 @@ static int usb_audio_probe(struct usb_interface *intf,
 	chip->num_interfaces++;
 	usb_set_intfdata(intf, chip);
 	atomic_dec(&chip->active);
+
+	if (platform_ops && platform_ops->connect_cb)
+		platform_ops->connect_cb(chip);
 	mutex_unlock(&register_mutex);
+
 	return 0;
 
  __error:
@@ -983,6 +1023,9 @@ static void usb_audio_disconnect(struct usb_interface *intf)
 	card = chip->card;
 
 	mutex_lock(&register_mutex);
+	if (platform_ops && platform_ops->disconnect_cb)
+		platform_ops->disconnect_cb(chip);
+
 	if (atomic_inc_return(&chip->shutdown) == 1) {
 		struct snd_usb_stream *as;
 		struct snd_usb_endpoint *ep;
@@ -1130,6 +1173,9 @@ static int usb_audio_suspend(struct usb_interface *intf, pm_message_t message)
 		chip->system_suspend = chip->num_suspended_intf;
 	}
 
+	if (platform_ops && platform_ops->suspend_cb)
+		platform_ops->suspend_cb(intf, message);
+
 	return 0;
 }
 
@@ -1170,6 +1216,9 @@ static int usb_audio_resume(struct usb_interface *intf)
 
 	snd_usb_midi_v2_resume_all(chip);
 
+	if (platform_ops && platform_ops->resume_cb)
+		platform_ops->resume_cb(intf);
+
  out:
 	if (chip->num_suspended_intf == chip->system_suspend) {
 		snd_power_change_state(chip->card, SNDRV_CTL_POWER_D0);
diff --git a/sound/usb/card.h b/sound/usb/card.h
index cdafc9e9cecd..d8b8522e1613 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -209,7 +209,17 @@ struct snd_usb_stream {
 	struct list_head list;
 };
 
+struct snd_usb_platform_ops {
+	void (*connect_cb)(struct snd_usb_audio *chip);
+	void (*disconnect_cb)(struct snd_usb_audio *chip);
+	void (*suspend_cb)(struct usb_interface *intf, pm_message_t message);
+	void (*resume_cb)(struct usb_interface *intf);
+};
+
 struct snd_usb_stream *
 snd_usb_find_suppported_substream(int card_idx, struct snd_pcm_hw_params *params,
 				  int direction);
+
+int snd_usb_register_platform_ops(struct snd_usb_platform_ops *ops);
+int snd_usb_unregister_platform_ops(void);
 #endif /* __USBAUDIO_CARD_H */

^ permalink raw reply related

* [PATCH v28 08/32] usb: dwc3: Specify maximum number of XHCI interrupters
From: Wesley Cheng @ 2024-09-25  0:59 UTC (permalink / raw)
  To: srinivas.kandagatla, mathias.nyman, perex, conor+dt,
	dmitry.torokhov, corbet, broonie, lgirdwood, tiwai, krzk+dt,
	pierre-louis.bossart, Thinh.Nguyen, bgoswami, robh, gregkh
  Cc: linux-kernel, devicetree, linux-sound, linux-input, linux-usb,
	linux-arm-msm, linux-doc, alsa-devel, Wesley Cheng
In-Reply-To: <20240925010000.2231406-1-quic_wcheng@quicinc.com>

Allow for the DWC3 host driver to pass along XHCI property that defines
how many interrupters to allocate.  This is in relation for the number of
event rings that can be potentially used by other processors within the
system.

Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
 drivers/usb/dwc3/core.c | 12 ++++++++++++
 drivers/usb/dwc3/core.h |  2 ++
 drivers/usb/dwc3/host.c |  3 +++
 3 files changed, 17 insertions(+)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 7ee61a89520b..f98d5d04f493 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1573,6 +1573,7 @@ static void dwc3_get_properties(struct dwc3 *dwc)
 	u8			tx_thr_num_pkt_prd = 0;
 	u8			tx_max_burst_prd = 0;
 	u8			tx_fifo_resize_max_num;
+	u16			num_hc_interrupters;
 	const char		*usb_psy_name;
 	int			ret;
 
@@ -1595,6 +1596,9 @@ static void dwc3_get_properties(struct dwc3 *dwc)
 	 */
 	tx_fifo_resize_max_num = 6;
 
+	/* default to a single XHCI interrupter */
+	num_hc_interrupters = 1;
+
 	dwc->maximum_speed = usb_get_maximum_speed(dev);
 	dwc->max_ssp_rate = usb_get_maximum_ssp_rate(dev);
 	dwc->dr_mode = usb_get_dr_mode(dev);
@@ -1648,6 +1652,12 @@ static void dwc3_get_properties(struct dwc3 *dwc)
 				&tx_thr_num_pkt_prd);
 	device_property_read_u8(dev, "snps,tx-max-burst-prd",
 				&tx_max_burst_prd);
+	device_property_read_u16(dev, "num-hc-interrupters",
+				 &num_hc_interrupters);
+	/* DWC3 core allowed to have a max of 8 interrupters */
+	if (num_hc_interrupters > 8)
+		num_hc_interrupters = 8;
+
 	dwc->do_fifo_resize = device_property_read_bool(dev,
 							"tx-fifo-resize");
 	if (dwc->do_fifo_resize)
@@ -1736,6 +1746,8 @@ static void dwc3_get_properties(struct dwc3 *dwc)
 	dwc->imod_interval = 0;
 
 	dwc->tx_fifo_resize_max_num = tx_fifo_resize_max_num;
+
+	dwc->num_hc_interrupters = num_hc_interrupters;
 }
 
 /* check whether the core supports IMOD */
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 3781c736c1a1..95e6989d116e 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -1077,6 +1077,7 @@ struct dwc3_scratchpad_array {
  * @tx_max_burst_prd: max periodic ESS transmit burst size
  * @tx_fifo_resize_max_num: max number of fifos allocated during txfifo resize
  * @clear_stall_protocol: endpoint number that requires a delayed status phase
+ * @num_hc_interrupters: number of host controller interrupters
  * @hsphy_interface: "utmi" or "ulpi"
  * @connected: true when we're connected to a host, false otherwise
  * @softconnect: true when gadget connect is called, false when disconnect runs
@@ -1318,6 +1319,7 @@ struct dwc3 {
 	u8			tx_max_burst_prd;
 	u8			tx_fifo_resize_max_num;
 	u8			clear_stall_protocol;
+	u16			num_hc_interrupters;
 
 	const char		*hsphy_interface;
 
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index a171b27a7845..d883cd7b1615 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -180,6 +180,9 @@ int dwc3_host_init(struct dwc3 *dwc)
 	if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
 		props[prop_idx++] = PROPERTY_ENTRY_BOOL("quirk-broken-port-ped");
 
+	props[prop_idx++] = PROPERTY_ENTRY_U16("num-hc-interrupters",
+					       dwc->num_hc_interrupters);
+
 	if (prop_idx) {
 		ret = device_create_managed_software_node(&xhci->dev, props, NULL);
 		if (ret) {

^ permalink raw reply related

* [PATCH v28 17/32] ASoC: usb: Fetch ASoC card and pcm device information
From: Wesley Cheng @ 2024-09-25  0:59 UTC (permalink / raw)
  To: srinivas.kandagatla, mathias.nyman, perex, conor+dt,
	dmitry.torokhov, corbet, broonie, lgirdwood, tiwai, krzk+dt,
	pierre-louis.bossart, Thinh.Nguyen, bgoswami, robh, gregkh
  Cc: linux-kernel, devicetree, linux-sound, linux-input, linux-usb,
	linux-arm-msm, linux-doc, alsa-devel, Wesley Cheng
In-Reply-To: <20240925010000.2231406-1-quic_wcheng@quicinc.com>

USB SND needs to know how the USB offload path is being routed.  This would
allow for applications to open the corresponding sound card and pcm device
when it wants to take the audio offload path.  This callback should return
the mapped indexes based on the USB SND device information.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
 include/sound/soc-usb.h | 16 ++++++++++++++++
 sound/soc/soc-usb.c     | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git a/include/sound/soc-usb.h b/include/sound/soc-usb.h
index b32af08030ae..4c6af57291d8 100644
--- a/include/sound/soc-usb.h
+++ b/include/sound/soc-usb.h
@@ -36,6 +36,11 @@ struct snd_soc_usb_device {
  * @list - list head for SND SOC struct list
  * @component - reference to ASoC component
  * @connection_status_cb - callback to notify connection events
+ * @update_offload_route_info - callback to fetch mapped ASoC card and pcm
+ *				device pair.  This is unrelated to the concept
+ *				of DAPM route.  The "route" argument carries
+ *				an array used for a kcontrol output and should
+ *				contain two integers, card and pcm device index
  * @priv_data - driver data
  **/
 struct snd_soc_usb {
@@ -44,6 +49,9 @@ struct snd_soc_usb {
 	int (*connection_status_cb)(struct snd_soc_usb *usb,
 				    struct snd_soc_usb_device *sdev,
 				    bool connected);
+	int (*update_offload_route_info)(struct snd_soc_component *component,
+					 int card, int pcm, int direction,
+					 long *route);
 	void *priv_data;
 };
 
@@ -59,6 +67,8 @@ void *snd_soc_usb_find_priv_data(struct device *usbdev);
 int snd_soc_usb_setup_offload_jack(struct snd_soc_component *component,
 				   struct snd_soc_jack *jack);
 int snd_soc_usb_disable_offload_jack(struct snd_soc_component *component);
+int snd_soc_usb_update_offload_route(struct device *dev, int card, int pcm,
+				     int direction, long *route);
 
 struct snd_soc_usb *snd_soc_usb_allocate_port(struct snd_soc_component *component,
 					      void *data);
@@ -101,6 +111,12 @@ static inline int snd_soc_usb_disable_offload_jack(struct snd_soc_component *com
 	return 0;
 }
 
+static int snd_soc_usb_update_offload_route(struct device *dev, int card, int pcm,
+					    int direction, long *route)
+{
+	return -ENODEV;
+}
+
 static inline struct snd_soc_usb *
 snd_soc_usb_allocate_port(struct snd_soc_component *component, void *data)
 {
diff --git a/sound/soc/soc-usb.c b/sound/soc/soc-usb.c
index 70d8f854c017..f88ccf90df32 100644
--- a/sound/soc/soc-usb.c
+++ b/sound/soc/soc-usb.c
@@ -118,6 +118,40 @@ int snd_soc_usb_disable_offload_jack(struct snd_soc_component *component)
 }
 EXPORT_SYMBOL_GPL(snd_soc_usb_disable_offload_jack);
 
+/**
+ * snd_soc_usb_update_offload_route - Find active USB offload path
+ * @dev - USB device to get offload status
+ * @card - USB card index
+ * @pcm - USB PCM device index
+ * @direction - playback or capture direction
+ * @route - pointer to route output array
+ *
+ * Fetch the current status for the USB SND card and PCM device indexes
+ * specified.  The "route" argument should be an array of integers being
+ * used for a kcontrol output.  The first element should have the selected
+ * card index, and the second element should have the selected pcm device
+ * index.
+ */
+int snd_soc_usb_update_offload_route(struct device *dev, int card, int pcm,
+				     int direction, long *route)
+{
+	struct snd_soc_usb *ctx;
+	int ret;
+
+	ctx = snd_soc_find_usb_ctx(dev);
+	if (!ctx)
+		return -ENODEV;
+
+	mutex_lock(&ctx_mutex);
+	if (ctx && ctx->update_offload_route_info)
+		ret = ctx->update_offload_route_info(ctx->component, card, pcm,
+						     direction, route);
+	mutex_unlock(&ctx_mutex);
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(snd_soc_usb_update_offload_route);
+
 /**
  * snd_soc_usb_find_priv_data() - Retrieve private data stored
  * @usbdev: device reference

^ permalink raw reply related

* [PATCH v28 12/32] ALSA: usb-audio: Save UAC sample size information
From: Wesley Cheng @ 2024-09-25  0:59 UTC (permalink / raw)
  To: srinivas.kandagatla, mathias.nyman, perex, conor+dt,
	dmitry.torokhov, corbet, broonie, lgirdwood, tiwai, krzk+dt,
	pierre-louis.bossart, Thinh.Nguyen, bgoswami, robh, gregkh
  Cc: linux-kernel, devicetree, linux-sound, linux-input, linux-usb,
	linux-arm-msm, linux-doc, alsa-devel, Wesley Cheng
In-Reply-To: <20240925010000.2231406-1-quic_wcheng@quicinc.com>

Within the UAC descriptor, there is information describing the size of a
sample (bSubframeSize/bSubslotSize) and the number of relevant bits
(bBitResolution).  Currently, fmt_bits carries only the bit resolution,
however, some offloading entities may also require the overall size of the
sample.  Save this information in a separate parameter, as depending on the
UAC format type, the sample size can not easily be decoded from other
existing parameters.

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
 sound/usb/card.h   | 1 +
 sound/usb/format.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sound/usb/card.h b/sound/usb/card.h
index 4f4f3f39b7fa..b65163c60176 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -15,6 +15,7 @@ struct audioformat {
 	unsigned int channels;		/* # channels */
 	unsigned int fmt_type;		/* USB audio format type (1-3) */
 	unsigned int fmt_bits;		/* number of significant bits */
+	unsigned int fmt_sz;		/* overall audio sub frame/slot size */
 	unsigned int frame_size;	/* samples per frame for non-audio */
 	unsigned char iface;		/* interface number */
 	unsigned char altsetting;	/* corresponding alternate setting */
diff --git a/sound/usb/format.c b/sound/usb/format.c
index 3b45d0ee7693..5fde543536a8 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -80,6 +80,7 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
 	}
 
 	fp->fmt_bits = sample_width;
+	fp->fmt_sz = sample_bytes;
 
 	if ((pcm_formats == 0) &&
 	    (format == 0 || format == (1 << UAC_FORMAT_TYPE_I_UNDEFINED))) {

^ permalink raw reply related

* [PATCH v28 13/32] ALSA: usb-audio: Prevent starting of audio stream if in use
From: Wesley Cheng @ 2024-09-25  0:59 UTC (permalink / raw)
  To: srinivas.kandagatla, mathias.nyman, perex, conor+dt,
	dmitry.torokhov, corbet, broonie, lgirdwood, tiwai, krzk+dt,
	pierre-louis.bossart, Thinh.Nguyen, bgoswami, robh, gregkh
  Cc: linux-kernel, devicetree, linux-sound, linux-input, linux-usb,
	linux-arm-msm, linux-doc, alsa-devel, Wesley Cheng
In-Reply-To: <20240925010000.2231406-1-quic_wcheng@quicinc.com>

With USB audio offloading, an audio session is started from the ASoC
platform sound card and PCM devices.  Likewise, the USB SND path is still
readily available for use, in case the non-offload path is desired.  In
order to prevent the two entities from attempting to use the USB bus,
introduce a flag that determines when either paths are in use.

If a PCM device is already in use, the check will return an error to
userspace notifying that the stream is currently busy.  This ensures that
only one path is using the USB substream.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
 sound/usb/card.h |  1 +
 sound/usb/pcm.c  | 29 ++++++++++++++++++++++++++---
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/sound/usb/card.h b/sound/usb/card.h
index b65163c60176..cdafc9e9cecd 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -165,6 +165,7 @@ struct snd_usb_substream {
 	unsigned int pkt_offset_adj;	/* Bytes to drop from beginning of packets (for non-compliant devices) */
 	unsigned int stream_offset_adj;	/* Bytes to drop from beginning of stream (for non-compliant devices) */
 
+	unsigned int opened:1;		/* pcm device opened */
 	unsigned int running: 1;	/* running status */
 	unsigned int period_elapsed_pending;	/* delay period handling */
 
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 18467da6fd9e..b24ee38fad72 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -1241,8 +1241,17 @@ static int snd_usb_pcm_open(struct snd_pcm_substream *substream)
 	struct snd_usb_stream *as = snd_pcm_substream_chip(substream);
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct snd_usb_substream *subs = &as->substream[direction];
+	struct snd_usb_audio *chip = subs->stream->chip;
 	int ret;
 
+	mutex_lock(&chip->mutex);
+	if (subs->opened) {
+		mutex_unlock(&chip->mutex);
+		return -EBUSY;
+	}
+	subs->opened = 1;
+	mutex_unlock(&chip->mutex);
+
 	runtime->hw = snd_usb_hardware;
 	/* need an explicit sync to catch applptr update in low-latency mode */
 	if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
@@ -1259,13 +1268,23 @@ static int snd_usb_pcm_open(struct snd_pcm_substream *substream)
 
 	ret = setup_hw_info(runtime, subs);
 	if (ret < 0)
-		return ret;
+		goto err_open;
 	ret = snd_usb_autoresume(subs->stream->chip);
 	if (ret < 0)
-		return ret;
+		goto err_open;
 	ret = snd_media_stream_init(subs, as->pcm, direction);
 	if (ret < 0)
-		snd_usb_autosuspend(subs->stream->chip);
+		goto err_resume;
+
+	return 0;
+
+err_resume:
+	snd_usb_autosuspend(subs->stream->chip);
+err_open:
+	mutex_lock(&chip->mutex);
+	subs->opened = 0;
+	mutex_unlock(&chip->mutex);
+
 	return ret;
 }
 
@@ -1274,6 +1293,7 @@ static int snd_usb_pcm_close(struct snd_pcm_substream *substream)
 	int direction = substream->stream;
 	struct snd_usb_stream *as = snd_pcm_substream_chip(substream);
 	struct snd_usb_substream *subs = &as->substream[direction];
+	struct snd_usb_audio *chip = subs->stream->chip;
 	int ret;
 
 	snd_media_stop_pipeline(subs);
@@ -1287,6 +1307,9 @@ static int snd_usb_pcm_close(struct snd_pcm_substream *substream)
 
 	subs->pcm_substream = NULL;
 	snd_usb_autosuspend(subs->stream->chip);
+	mutex_lock(&chip->mutex);
+	subs->opened = 0;
+	mutex_unlock(&chip->mutex);
 
 	return 0;
 }

^ permalink raw reply related

* [PATCH v28 20/32] ASoC: dt-bindings: Update example for enabling USB offload on SM8250
From: Wesley Cheng @ 2024-09-25  0:59 UTC (permalink / raw)
  To: srinivas.kandagatla, mathias.nyman, perex, conor+dt,
	dmitry.torokhov, corbet, broonie, lgirdwood, tiwai, krzk+dt,
	pierre-louis.bossart, Thinh.Nguyen, bgoswami, robh, gregkh
  Cc: linux-kernel, devicetree, linux-sound, linux-input, linux-usb,
	linux-arm-msm, linux-doc, alsa-devel, Wesley Cheng
In-Reply-To: <20240925010000.2231406-1-quic_wcheng@quicinc.com>

Add an example on enabling of USB offload for the Q6DSP.  The routing can
be done by the mixer, which can pass the multimedia stream to the USB
backend.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
 .../devicetree/bindings/sound/qcom,sm8250.yaml    | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
index b2e15ebbd1bc..f2d708f899bf 100644
--- a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
@@ -229,6 +229,21 @@ examples:
                 sound-dai = <&vamacro 0>;
             };
         };
+
+        usb-dai-link {
+            link-name = "USB Playback";
+            cpu {
+                sound-dai = <&q6afedai USB_RX>;
+            };
+
+            codec {
+                sound-dai = <&usbdai USB_RX>;
+            };
+
+            platform {
+                sound-dai = <&q6routing>;
+            };
+        };
     };
 
   - |

^ permalink raw reply related

* [PATCH v28 11/32] ALSA: usb-audio: Check for support for requested audio format
From: Wesley Cheng @ 2024-09-25  0:59 UTC (permalink / raw)
  To: srinivas.kandagatla, mathias.nyman, perex, conor+dt,
	dmitry.torokhov, corbet, broonie, lgirdwood, tiwai, krzk+dt,
	pierre-louis.bossart, Thinh.Nguyen, bgoswami, robh, gregkh
  Cc: linux-kernel, devicetree, linux-sound, linux-input, linux-usb,
	linux-arm-msm, linux-doc, alsa-devel, Wesley Cheng
In-Reply-To: <20240925010000.2231406-1-quic_wcheng@quicinc.com>

Allow for checks on a specific USB audio device to see if a requested PCM
format is supported.  This is needed for support when playback is
initiated by the ASoC USB backend path.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
 sound/usb/card.c | 32 ++++++++++++++++++++++++++++++++
 sound/usb/card.h |  3 +++
 2 files changed, 35 insertions(+)

diff --git a/sound/usb/card.c b/sound/usb/card.c
index c6d9d8d548b4..1f9dfcd8f336 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -119,6 +119,38 @@ static DEFINE_MUTEX(register_mutex);
 static struct snd_usb_audio *usb_chip[SNDRV_CARDS];
 static struct usb_driver usb_audio_driver;
 
+/*
+ * Checks to see if requested audio profile, i.e sample rate, # of
+ * channels, etc... is supported by the substream associated to the
+ * USB audio device.
+ */
+struct snd_usb_stream *
+snd_usb_find_suppported_substream(int card_idx, struct snd_pcm_hw_params *params,
+				  int direction)
+{
+	struct snd_usb_audio *chip;
+	struct snd_usb_substream *subs;
+	struct snd_usb_stream *as;
+
+	/*
+	 * Register mutex is held when populating and clearing usb_chip
+	 * array.
+	 */
+	guard(mutex)(&register_mutex);
+	chip = usb_chip[card_idx];
+
+	if (chip && enable[card_idx]) {
+		list_for_each_entry(as, &chip->pcm_list, list) {
+			subs = &as->substream[direction];
+			if (snd_usb_find_substream_format(subs, params))
+				return as;
+		}
+	}
+
+	return NULL;
+}
+EXPORT_SYMBOL_GPL(snd_usb_find_suppported_substream);
+
 /*
  * disconnect streams
  * called from usb_audio_disconnect()
diff --git a/sound/usb/card.h b/sound/usb/card.h
index 6ec95b2edf86..4f4f3f39b7fa 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -207,4 +207,7 @@ struct snd_usb_stream {
 	struct list_head list;
 };
 
+struct snd_usb_stream *
+snd_usb_find_suppported_substream(int card_idx, struct snd_pcm_hw_params *params,
+				  int direction);
 #endif /* __USBAUDIO_CARD_H */

^ permalink raw reply related

* [PATCH v28 03/32] xhci: sideband: add initial api to register a sideband entity
From: Wesley Cheng @ 2024-09-25  0:59 UTC (permalink / raw)
  To: srinivas.kandagatla, mathias.nyman, perex, conor+dt,
	dmitry.torokhov, corbet, broonie, lgirdwood, tiwai, krzk+dt,
	pierre-louis.bossart, Thinh.Nguyen, bgoswami, robh, gregkh
  Cc: linux-kernel, devicetree, linux-sound, linux-input, linux-usb,
	linux-arm-msm, linux-doc, alsa-devel, Mathias Nyman, Wesley Cheng
In-Reply-To: <20240925010000.2231406-1-quic_wcheng@quicinc.com>

From: Mathias Nyman <mathias.nyman@linux.intel.com>

Introduce XHCI sideband, which manages the USB endpoints being requested by
a client driver.  This is used for when client drivers are attempting to
offload USB endpoints to another entity for handling USB transfers.  XHCI
sideband will allow for drivers to fetch the required information about the
transfer ring, so the user can submit transfers independently.  Expose the
required APIs for drivers to register and request for a USB endpoint and to
manage XHCI secondary interrupters.

Multiple ring segment page linking, proper endpoint clean up, and allowing
module compilation added by Wesley Cheng to complete original concept code
by Mathias Nyman.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Co-developed-by: Wesley Cheng <quic_wcheng@quicinc.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
 drivers/usb/host/Kconfig          |   9 +
 drivers/usb/host/Makefile         |   2 +
 drivers/usb/host/xhci-sideband.c  | 424 ++++++++++++++++++++++++++++++
 drivers/usb/host/xhci.h           |   4 +
 include/linux/usb/xhci-sideband.h |  70 +++++
 5 files changed, 509 insertions(+)
 create mode 100644 drivers/usb/host/xhci-sideband.c
 create mode 100644 include/linux/usb/xhci-sideband.h

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 4448d0ab06f0..96659efa4be5 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -104,6 +104,15 @@ config USB_XHCI_RZV2M
 	  Say 'Y' to enable the support for the xHCI host controller
 	  found in Renesas RZ/V2M SoC.
 
+config USB_XHCI_SIDEBAND
+	tristate "xHCI support for sideband"
+	help
+	  Say 'Y' to enable the support for the xHCI sideband capability.
+	  Provide a mechanism for a sideband datapath for payload associated
+	  with audio class endpoints. This allows for an audio DSP to use
+	  xHCI USB endpoints directly, allowing CPU to sleep while playing
+	  audio.
+
 config USB_XHCI_TEGRA
 	tristate "xHCI support for NVIDIA Tegra SoCs"
 	depends on PHY_TEGRA_XUSB
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index be4e5245c52f..435a1e93b40b 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -32,6 +32,8 @@ endif
 xhci-rcar-hcd-y				+= xhci-rcar.o
 xhci-rcar-hcd-$(CONFIG_USB_XHCI_RZV2M)	+= xhci-rzv2m.o
 
+obj-$(CONFIG_USB_XHCI_SIDEBAND) += xhci-sideband.o
+
 obj-$(CONFIG_USB_PCI)	+= pci-quirks.o
 
 obj-$(CONFIG_USB_EHCI_HCD)	+= ehci-hcd.o
diff --git a/drivers/usb/host/xhci-sideband.c b/drivers/usb/host/xhci-sideband.c
new file mode 100644
index 000000000000..69bc234818d2
--- /dev/null
+++ b/drivers/usb/host/xhci-sideband.c
@@ -0,0 +1,424 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * xHCI host controller sideband support
+ *
+ * Copyright (c) 2023, Intel Corporation.
+ *
+ * Author: Mathias Nyman
+ */
+
+#include <linux/usb/xhci-sideband.h>
+#include <linux/dma-direct.h>
+
+#include "xhci.h"
+
+/* sideband internal helpers */
+static struct sg_table *
+xhci_ring_to_sgtable(struct xhci_sideband *sb, struct xhci_ring *ring)
+{
+	struct xhci_segment *seg;
+	struct sg_table	*sgt;
+	unsigned int n_pages;
+	struct page **pages;
+	struct device *dev;
+	size_t sz;
+	int i;
+
+	dev = xhci_to_hcd(sb->xhci)->self.sysdev;
+	sz = ring->num_segs * TRB_SEGMENT_SIZE;
+	n_pages = PAGE_ALIGN(sz) >> PAGE_SHIFT;
+	pages = kvmalloc_array(n_pages, sizeof(struct page *), GFP_KERNEL);
+	if (!pages)
+		return NULL;
+
+	sgt = kzalloc(sizeof(*sgt), GFP_KERNEL);
+	if (!sgt) {
+		kvfree(pages);
+		return NULL;
+	}
+
+	seg = ring->first_seg;
+	if (!seg)
+		goto err;
+	/*
+	 * Rings can potentially have multiple segments, create an array that
+	 * carries page references to allocated segments.  Utilize the
+	 * sg_alloc_table_from_pages() to create the sg table, and to ensure
+	 * that page links are created.
+	 */
+	for (i = 0; i < ring->num_segs; i++) {
+		dma_get_sgtable(dev, sgt, seg->trbs, seg->dma,
+				TRB_SEGMENT_SIZE);
+		pages[i] = sg_page(sgt->sgl);
+		sg_free_table(sgt);
+		seg = seg->next;
+	}
+
+	if (sg_alloc_table_from_pages(sgt, pages, n_pages, 0, sz, GFP_KERNEL))
+		goto err;
+
+	/*
+	 * Save first segment dma address to sg dma_address field for the sideband
+	 * client to have access to the IOVA of the ring.
+	 */
+	sg_dma_address(sgt->sgl) = ring->first_seg->dma;
+
+	return sgt;
+
+err:
+	kvfree(pages);
+	kfree(sgt);
+
+	return NULL;
+}
+
+static void
+__xhci_sideband_remove_endpoint(struct xhci_sideband *sb, struct xhci_virt_ep *ep)
+{
+	/*
+	 * Issue a stop endpoint command when an endpoint is removed.
+	 * The stop ep cmd handler will handle the ring cleanup.
+	 */
+	xhci_stop_endpoint_sync(sb->xhci, ep, 0, GFP_KERNEL);
+
+	ep->sideband = NULL;
+	sb->eps[ep->ep_index] = NULL;
+}
+
+/* sideband api functions */
+
+/**
+ * xhci_sideband_add_endpoint - add endpoint to sideband access list
+ * @sb: sideband instance for this usb device
+ * @host_ep: usb host endpoint
+ *
+ * Adds an endpoint to the list of sideband accessed endpoints for this usb
+ * device.
+ * After an endpoint is added the sideband client can get the endpoint transfer
+ * ring buffer by calling xhci_sideband_endpoint_buffer()
+ *
+ * Return: 0 on success, negative error otherwise.
+ */
+int
+xhci_sideband_add_endpoint(struct xhci_sideband *sb,
+			   struct usb_host_endpoint *host_ep)
+{
+	struct xhci_virt_ep *ep;
+	unsigned int ep_index;
+
+	mutex_lock(&sb->mutex);
+	ep_index = xhci_get_endpoint_index(&host_ep->desc);
+	ep = &sb->vdev->eps[ep_index];
+
+	if (ep->ep_state & EP_HAS_STREAMS) {
+		mutex_unlock(&sb->mutex);
+		return -EINVAL;
+	}
+
+	/*
+	 * Note, we don't know the DMA mask of the audio DSP device, if its
+	 * smaller than for xhci it won't be able to access the endpoint ring
+	 * buffer. This could be solved by not allowing the audio class driver
+	 * to add the endpoint the normal way, but instead offload it immediately,
+	 * and let this function add the endpoint and allocate the ring buffer
+	 * with the smallest common DMA mask
+	 */
+	if (sb->eps[ep_index] || ep->sideband) {
+		mutex_unlock(&sb->mutex);
+		return -EBUSY;
+	}
+
+	ep->sideband = sb;
+	sb->eps[ep_index] = ep;
+	mutex_unlock(&sb->mutex);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(xhci_sideband_add_endpoint);
+
+/**
+ * xhci_sideband_remove_endpoint - remove endpoint from sideband access list
+ * @sb: sideband instance for this usb device
+ * @host_ep: usb host endpoint
+ *
+ * Removes an endpoint from the list of sideband accessed endpoints for this usb
+ * device.
+ * sideband client should no longer touch the endpoint transfer buffer after
+ * calling this.
+ *
+ * Return: 0 on success, negative error otherwise.
+ */
+int
+xhci_sideband_remove_endpoint(struct xhci_sideband *sb,
+			      struct usb_host_endpoint *host_ep)
+{
+	struct xhci_virt_ep *ep;
+	unsigned int ep_index;
+
+	mutex_lock(&sb->mutex);
+	ep_index = xhci_get_endpoint_index(&host_ep->desc);
+	ep = sb->eps[ep_index];
+
+	if (!ep || !ep->sideband || ep->sideband != sb) {
+		mutex_unlock(&sb->mutex);
+		return -ENODEV;
+	}
+
+	__xhci_sideband_remove_endpoint(sb, ep);
+	xhci_initialize_ring_info(ep->ring, 1);
+	mutex_unlock(&sb->mutex);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(xhci_sideband_remove_endpoint);
+
+int
+xhci_sideband_stop_endpoint(struct xhci_sideband *sb,
+			    struct usb_host_endpoint *host_ep)
+{
+	struct xhci_virt_ep *ep;
+	unsigned int ep_index;
+
+	ep_index = xhci_get_endpoint_index(&host_ep->desc);
+	ep = sb->eps[ep_index];
+
+	if (!ep || !ep->sideband || ep->sideband != sb)
+		return -EINVAL;
+
+	return xhci_stop_endpoint_sync(sb->xhci, ep, 0, GFP_KERNEL);
+}
+EXPORT_SYMBOL_GPL(xhci_sideband_stop_endpoint);
+
+/**
+ * xhci_sideband_get_endpoint_buffer - gets the endpoint transfer buffer address
+ * @sb: sideband instance for this usb device
+ * @host_ep: usb host endpoint
+ *
+ * Returns the address of the endpoint buffer where xHC controller reads queued
+ * transfer TRBs from. This is the starting address of the ringbuffer where the
+ * sideband client should write TRBs to.
+ *
+ * Caller needs to free the returned sg_table
+ *
+ * Return: struct sg_table * if successful. NULL otherwise.
+ */
+struct sg_table *
+xhci_sideband_get_endpoint_buffer(struct xhci_sideband *sb,
+				  struct usb_host_endpoint *host_ep)
+{
+	struct xhci_virt_ep *ep;
+	unsigned int ep_index;
+
+	ep_index = xhci_get_endpoint_index(&host_ep->desc);
+	ep = sb->eps[ep_index];
+
+	if (!ep || !ep->sideband || ep->sideband != sb)
+		return NULL;
+
+	return xhci_ring_to_sgtable(sb, ep->ring);
+}
+EXPORT_SYMBOL_GPL(xhci_sideband_get_endpoint_buffer);
+
+/**
+ * xhci_sideband_get_event_buffer - return the event buffer for this device
+ * @sb: sideband instance for this usb device
+ *
+ * If a secondary xhci interupter is set up for this usb device then this
+ * function returns the address of the event buffer where xHC writes
+ * the transfer completion events.
+ *
+ * Caller needs to free the returned sg_table
+ *
+ * Return: struct sg_table * if successful. NULL otherwise.
+ */
+struct sg_table *
+xhci_sideband_get_event_buffer(struct xhci_sideband *sb)
+{
+	if (!sb || !sb->ir)
+		return NULL;
+
+	return xhci_ring_to_sgtable(sb, sb->ir->event_ring);
+}
+EXPORT_SYMBOL_GPL(xhci_sideband_get_event_buffer);
+
+/**
+ * xhci_sideband_create_interrupter - creates a new interrupter for this sideband
+ * @sb: sideband instance for this usb device
+ * @num_seg: number of event ring segments to allocate
+ * @ip_autoclear: IP autoclearing support such as MSI implemented
+ *
+ * Sets up a xhci interrupter that can be used for this sideband accessed usb
+ * device. Transfer events for this device can be routed to this interrupters
+ * event ring by setting the 'Interrupter Target' field correctly when queueing
+ * the transfer TRBs.
+ * Once this interrupter is created the interrupter target ID can be obtained
+ * by calling xhci_sideband_interrupter_id()
+ *
+ * Returns 0 on success, negative error otherwise
+ */
+int
+xhci_sideband_create_interrupter(struct xhci_sideband *sb, int num_seg,
+				 bool ip_autoclear)
+{
+	int ret = 0;
+
+	if (!sb || !sb->xhci)
+		return -ENODEV;
+
+	mutex_lock(&sb->mutex);
+	if (sb->ir) {
+		ret = -EBUSY;
+		goto out;
+	}
+
+	sb->ir = xhci_create_secondary_interrupter(xhci_to_hcd(sb->xhci),
+						   num_seg);
+	if (!sb->ir) {
+		ret = -ENOMEM;
+		goto out;
+	}
+
+	sb->ir->ip_autoclear = ip_autoclear;
+	/* skip events for secondary interrupters by default */
+	sb->ir->skip_events = true;
+
+out:
+	mutex_unlock(&sb->mutex);
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(xhci_sideband_create_interrupter);
+
+/**
+ * xhci_sideband_remove_interrupter - remove the interrupter from a sideband
+ * @sb: sideband instance for this usb device
+ *
+ * Removes a registered interrupt for a sideband.  This would allow for other
+ * sideband users to utilize this interrupter.
+ */
+void
+xhci_sideband_remove_interrupter(struct xhci_sideband *sb)
+{
+	if (!sb || !sb->ir)
+		return;
+
+	mutex_lock(&sb->mutex);
+	xhci_remove_secondary_interrupter(xhci_to_hcd(sb->xhci), sb->ir);
+
+	sb->ir = NULL;
+	mutex_unlock(&sb->mutex);
+}
+EXPORT_SYMBOL_GPL(xhci_sideband_remove_interrupter);
+
+/**
+ * xhci_sideband_interrupter_id - return the interrupter target id
+ * @sb: sideband instance for this usb device
+ *
+ * If a secondary xhci interrupter is set up for this usb device then this
+ * function returns the ID used by the interrupter. The sideband client
+ * needs to write this ID to the 'Interrupter Target' field of the transfer TRBs
+ * it queues on the endpoints transfer ring to ensure transfer completion event
+ * are written by xHC to the correct interrupter event ring.
+ *
+ * Returns interrupter id on success, negative error othgerwise
+ */
+int
+xhci_sideband_interrupter_id(struct xhci_sideband *sb)
+{
+	if (!sb || !sb->ir)
+		return -ENODEV;
+
+	return sb->ir->intr_num;
+}
+EXPORT_SYMBOL_GPL(xhci_sideband_interrupter_id);
+
+/**
+ * xhci_sideband_register - register a sideband for a usb device
+ * @udev: usb device to be accessed via sideband
+ *
+ * Allows for clients to utilize XHCI interrupters and fetch transfer and event
+ * ring parameters for executing data transfers.
+ *
+ * Return: pointer to a new xhci_sideband instance if successful. NULL otherwise.
+ */
+struct xhci_sideband *
+xhci_sideband_register(struct usb_device *udev)
+{
+	struct usb_hcd *hcd = bus_to_hcd(udev->bus);
+	struct xhci_hcd *xhci = hcd_to_xhci(hcd);
+	struct xhci_virt_device *vdev;
+	struct xhci_sideband *sb;
+
+	/* make sure the usb device is connected to a xhci controller */
+	if (!udev->slot_id)
+		return NULL;
+
+	sb = kzalloc_node(sizeof(*sb), GFP_KERNEL, dev_to_node(hcd->self.sysdev));
+	if (!sb)
+		return NULL;
+
+	mutex_init(&sb->mutex);
+
+	/* check this device isn't already controlled via sideband */
+	spin_lock_irq(&xhci->lock);
+
+	vdev = xhci->devs[udev->slot_id];
+
+	if (!vdev || vdev->sideband) {
+		xhci_warn(xhci, "XHCI sideband for slot %d already in use\n",
+			  udev->slot_id);
+		spin_unlock_irq(&xhci->lock);
+		kfree(sb);
+		return NULL;
+	}
+
+	sb->xhci = xhci;
+	sb->vdev = vdev;
+	vdev->sideband = sb;
+
+	spin_unlock_irq(&xhci->lock);
+
+	return sb;
+}
+EXPORT_SYMBOL_GPL(xhci_sideband_register);
+
+/**
+ * xhci_sideband_unregister - unregister sideband access to a usb device
+ * @sb: sideband instance to be unregistered
+ *
+ * Unregisters sideband access to a usb device and frees the sideband
+ * instance.
+ * After this the endpoint and interrupter event buffers should no longer
+ * be accessed via sideband. The xhci driver can now take over handling
+ * the buffers.
+ */
+void
+xhci_sideband_unregister(struct xhci_sideband *sb)
+{
+	struct xhci_hcd *xhci;
+	int i;
+
+	if (!sb)
+		return;
+
+	xhci = sb->xhci;
+
+	mutex_lock(&sb->mutex);
+	for (i = 0; i < EP_CTX_PER_DEV; i++)
+		if (sb->eps[i])
+			__xhci_sideband_remove_endpoint(sb, sb->eps[i]);
+	mutex_unlock(&sb->mutex);
+
+	xhci_sideband_remove_interrupter(sb);
+
+	spin_lock_irq(&xhci->lock);
+	sb->xhci = NULL;
+	sb->vdev->sideband = NULL;
+	spin_unlock_irq(&xhci->lock);
+
+	kfree(sb);
+}
+EXPORT_SYMBOL_GPL(xhci_sideband_unregister);
+MODULE_DESCRIPTION("xHCI sideband driver for secondary interrupter management");
+MODULE_LICENSE("GPL");
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index a6fbfc11fb1d..503784345787 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -693,6 +693,8 @@ struct xhci_virt_ep {
 	int			next_frame_id;
 	/* Use new Isoch TRB layout needed for extended TBC support */
 	bool			use_extended_tbc;
+	/* set if this endpoint is controlled via sideband access*/
+	struct xhci_sideband	*sideband;
 };
 
 enum xhci_overhead_type {
@@ -755,6 +757,8 @@ struct xhci_virt_device {
 	u16				current_mel;
 	/* Used for the debugfs interfaces. */
 	void				*debugfs_private;
+	/* set if this device is registered for sideband access */
+	struct xhci_sideband		*sideband;
 };
 
 /*
diff --git a/include/linux/usb/xhci-sideband.h b/include/linux/usb/xhci-sideband.h
new file mode 100644
index 000000000000..6c11e240fbca
--- /dev/null
+++ b/include/linux/usb/xhci-sideband.h
@@ -0,0 +1,70 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * xHCI host controller sideband support
+ *
+ * Copyright (c) 2023, Intel Corporation.
+ *
+ * Author: Mathias Nyman <mathias.nyman@linux.intel.com>
+ */
+
+#ifndef __LINUX_XHCI_SIDEBAND_H
+#define __LINUX_XHCI_SIDEBAND_H
+
+#include <linux/scatterlist.h>
+#include <linux/usb.h>
+
+#define	EP_CTX_PER_DEV		31	/* FIXME defined twice, from xhci.h */
+
+struct xhci_sideband;
+
+/**
+ * struct xhci_sideband - representation of a sideband accessed usb device.
+ * @xhci: The xhci host controller the usb device is connected to
+ * @vdev: the usb device accessed via sideband
+ * @eps: array of endpoints controlled via sideband
+ * @ir: event handling and buffer for sideband accessed device
+ * @mutex: mutex for sideband operations
+ *
+ * FIXME usb device accessed via sideband Keeping track of sideband accessed usb devices.
+ */
+
+struct xhci_sideband {
+	struct xhci_hcd                 *xhci;
+	struct xhci_virt_device         *vdev;
+	struct xhci_virt_ep             *eps[EP_CTX_PER_DEV];
+	struct xhci_interrupter         *ir;
+
+	/* Synchronizing xHCI sideband operations with client drivers operations */
+	struct mutex			mutex;
+};
+
+struct xhci_sideband *
+xhci_sideband_register(struct usb_device *udev);
+void
+xhci_sideband_unregister(struct xhci_sideband *sb);
+int
+xhci_sideband_add_endpoint(struct xhci_sideband *sb,
+			   struct usb_host_endpoint *host_ep);
+int
+xhci_sideband_remove_endpoint(struct xhci_sideband *sb,
+			      struct usb_host_endpoint *host_ep);
+int
+xhci_sideband_stop_endpoint(struct xhci_sideband *sb,
+			    struct usb_host_endpoint *host_ep);
+struct sg_table *
+xhci_sideband_get_endpoint_buffer(struct xhci_sideband *sb,
+				  struct usb_host_endpoint *host_ep);
+struct sg_table *
+xhci_sideband_get_event_buffer(struct xhci_sideband *sb);
+
+int
+xhci_sideband_create_interrupter(struct xhci_sideband *sb, int num_seg,
+				 bool ip_autoclear);
+
+void
+xhci_sideband_remove_interrupter(struct xhci_sideband *sb);
+
+int
+xhci_sideband_interrupter_id(struct xhci_sideband *sb);
+
+#endif /* __LINUX_XHCI_SIDEBAND_H */

^ permalink raw reply related

* [PATCH v28 22/32] ASoC: qcom: qdsp6: q6afe: Increase APR timeout
From: Wesley Cheng @ 2024-09-25  0:59 UTC (permalink / raw)
  To: srinivas.kandagatla, mathias.nyman, perex, conor+dt,
	dmitry.torokhov, corbet, broonie, lgirdwood, tiwai, krzk+dt,
	pierre-louis.bossart, Thinh.Nguyen, bgoswami, robh, gregkh
  Cc: linux-kernel, devicetree, linux-sound, linux-input, linux-usb,
	linux-arm-msm, linux-doc, alsa-devel, Wesley Cheng
In-Reply-To: <20240925010000.2231406-1-quic_wcheng@quicinc.com>

For USB offloading situations, the AFE port start command will result in a
QMI handshake between the Q6DSP and the main processor.  Depending on if
the USB bus is suspended, this routine would require more time to complete,
as resuming the USB bus has some overhead associated with it.  Increase the
timeout to 3s to allow for sufficient time for the USB QMI stream enable
handshake to complete.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
 sound/soc/qcom/qdsp6/q6afe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
index 3ee6ff8a6bc3..b5b2af2ce50c 100644
--- a/sound/soc/qcom/qdsp6/q6afe.c
+++ b/sound/soc/qcom/qdsp6/q6afe.c
@@ -366,7 +366,7 @@
 #define AFE_API_VERSION_SLOT_MAPPING_CONFIG	1
 #define AFE_API_VERSION_CODEC_DMA_CONFIG	1
 
-#define TIMEOUT_MS 1000
+#define TIMEOUT_MS 3000
 #define AFE_CMD_RESP_AVAIL	0
 #define AFE_CMD_RESP_NONE	1
 #define AFE_CLK_TOKEN		1024

^ permalink raw reply related

* hid-input.c && vendor defined usage pages
From: Aseda Aboagye @ 2024-09-25  0:32 UTC (permalink / raw)
  To: linux-input

Perhaps this is a naive question, but why does `hidinput_configure_usage()` in
`hid-input.c` configure vendor defined usage pages? In actuality, it seems like
it's mainly handling some HP specific usage pages.  Why aren't those in some
`hid-hp.c` file that's selected by a kernel config?

Curiously,

--
Aseda Aboagye

^ permalink raw reply

* Re: [PATCH v27 01/32] xhci: add helper to stop endpoint and wait for completion
From: Wesley Cheng @ 2024-09-24 21:47 UTC (permalink / raw)
  To: Michał Pecio
  Cc: mathias.nyman, Thinh.Nguyen, alsa-devel, bgoswami, broonie,
	conor+dt, corbet, devicetree, dmitry.torokhov, gregkh, krzk+dt,
	lgirdwood, linux-arm-msm, linux-doc, linux-input, linux-kernel,
	linux-sound, linux-usb, mathias.nyman, perex,
	pierre-louis.bossart, robh, srinivas.kandagatla, tiwai
In-Reply-To: <20240923012328.1e4d0bc6@foxbook>

Hi Michal

On 9/22/2024 4:23 PM, Michał Pecio wrote:
> Hi,
>
>> So what I ended up doing was to split off the context error handling
>> into a separate helper API, which can be also called for the sync ep
>> stop API.  From there, based on say....the helper re queuing the stop
>> EP command, it would return a specific value to signify that it has
>> done so.  The sync based API will then re-wait for the completion of
>> the subsequent stop endpoint command that was queued.
> AFAIK retries are only necessary on buggy hardware. I don't see them on
> my controllers except for two old ones, both with the same buggy chip.
>
>>  In all other context error cases, it'd return the error to the caller,
>> and its up to them to handle it accordingly.
> For the record, all existing callers end up ignoring this return value.
>
> Honestly, I don't know if improving this function is worth your effort
> if it's working for you as-is. There are no users except xhci-sideband
> and probably shouldn't be - besides failing to fix stalled endpoints,
> this function also does nothing to prevent automatic restart of the EP
> when new URBs are submitted through xhci_hcd, so it is mainly relevant
> for sideband users who never submit URBs the usual way.
>
> My issue with this function is that it is simply poorly documented what
> it is or isn't expected to achieve (both here and in the calling code
> in xhci-sideband.c), and the changelog message is wrong to suggest that
> the default completion handler will run (unless somewhere there are
> patches to make it happen), making it look like this code can do things
> that it really cannot do. And this is apparently a public, exported API.

Thanks for the clarifications.  Yes, unfortunately, I can't really test any scenarios where this would be exercised in the current path, so I will leave the code out for now, and just add some comments and updates to the commit message.  Can revisit when there is some other users for utilizing secondary interrupters.

Thanks

Wesley Cheng


^ permalink raw reply

* Re: [git pull] Input updates for v6.12-rc0
From: pr-tracker-bot @ 2024-09-24 20:21 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Linus Torvalds, linux-kernel, linux-input
In-Reply-To: <ZvKbeSkzyedREmXi@google.com>

The pull request you sent on Tue, 24 Sep 2024 03:59:05 -0700:

> git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git tags/input-for-v6.12-rc0

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/9ae2940cbcb332aee3c9d9a0bb0f2d7dc6a82e44

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply

* Re: [PATCH v1] HID: Fix typo in the comment
From: srinivas pandruvada @ 2024-09-24 14:30 UTC (permalink / raw)
  To: Yan Zhen, jikos, bentiss, bonbons, jic23
  Cc: lains, hadess, linux-input, linux-kernel, linux-iio, linux-usb,
	opensource.kernel
In-Reply-To: <20240924115005.3130997-1-yanzhen@vivo.com>

On Tue, 2024-09-24 at 19:50 +0800, Yan Zhen wrote:
> Correctly spelled comments make it easier for the reader to
> understand
> the code.
> 
> Fix typos:
> 'mninum' -> 'minimum',
> 'destoyed' -> 'destroyed',
> 'thridparty' -> 'thirdparty',
> 'lowcase' -> 'lowercase',
> 'idenitifiers' -> 'identifiers',
> 'exeuction' -> 'execution',
> 'fregments' -> 'fragments',
> 'devides' -> 'devices'.
> 
> Signed-off-by: Yan Zhen <yanzhen@vivo.com>

Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> ---
>  drivers/hid/hid-asus.c                      | 2 +-
>  drivers/hid/hid-logitech-hidpp.c            | 2 +-
>  drivers/hid/hid-picolcd_fb.c                | 2 +-
>  drivers/hid/hid-sensor-custom.c             | 2 +-
>  drivers/hid/hid-steam.c                     | 2 +-
>  drivers/hid/intel-ish-hid/ishtp-fw-loader.c | 2 +-
>  drivers/hid/intel-ish-hid/ishtp/client.c    | 2 +-
>  drivers/hid/usbhid/hid-core.c               | 2 +-
>  8 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> index a4b47319ad8e..506c6f377e7d 100644
> --- a/drivers/hid/hid-asus.c
> +++ b/drivers/hid/hid-asus.c
> @@ -1183,7 +1183,7 @@ static const __u8 *asus_report_fixup(struct
> hid_device *hdev, __u8 *rdesc,
>  
>         if (drvdata->quirks & QUIRK_G752_KEYBOARD &&
>                  *rsize == 75 && rdesc[61] == 0x15 && rdesc[62] ==
> 0x00) {
> -               /* report is missing usage mninum and maximum */
> +               /* report is missing usage minimum and maximum */
>                 __u8 *new_rdesc;
>                 size_t new_size = *rsize +
> sizeof(asus_g752_fixed_rdesc);
>  
> diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-
> logitech-hidpp.c
> index 0e33fa0eb8db..d6d066c89c0b 100644
> --- a/drivers/hid/hid-logitech-hidpp.c
> +++ b/drivers/hid/hid-logitech-hidpp.c
> @@ -2522,7 +2522,7 @@ static void hidpp_ff_work_handler(struct
> work_struct *w)
>                         /* regular effect destroyed */
>                         data->effect_ids[wd->params[0]-1] = -1;
>                 else if (wd->effect_id >=
> HIDPP_FF_EFFECTID_AUTOCENTER)
> -                       /* autocenter spring destoyed */
> +                       /* autocenter spring destroyed */
>                         data->slot_autocenter = 0;
>                 break;
>         case HIDPP_FF_SET_GLOBAL_GAINS:
> diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-
> picolcd_fb.c
> index 83e3409d170c..f8b16a82faef 100644
> --- a/drivers/hid/hid-picolcd_fb.c
> +++ b/drivers/hid/hid-picolcd_fb.c
> @@ -296,7 +296,7 @@ static void picolcd_fb_destroy(struct fb_info
> *info)
>         /* make sure no work is deferred */
>         fb_deferred_io_cleanup(info);
>  
> -       /* No thridparty should ever unregister our framebuffer! */
> +       /* No thirdparty should ever unregister our framebuffer! */
>         WARN_ON(fbdata->picolcd != NULL);
>  
>         vfree((u8 *)info->fix.smem_start);
> diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-
> sensor-custom.c
> index 66f0675df24b..617ae240396d 100644
> --- a/drivers/hid/hid-sensor-custom.c
> +++ b/drivers/hid/hid-sensor-custom.c
> @@ -946,7 +946,7 @@ hid_sensor_register_platform_device(struct
> platform_device *pdev,
>  
>         memcpy(real_usage, match->luid, 4);
>  
> -       /* usage id are all lowcase */
> +       /* usage id are all lowercase */
>         for (c = real_usage; *c != '\0'; c++)
>                 *c = tolower(*c);
>  
> diff --git a/drivers/hid/hid-steam.c b/drivers/hid/hid-steam.c
> index bf8b633114be..6439913372a8 100644
> --- a/drivers/hid/hid-steam.c
> +++ b/drivers/hid/hid-steam.c
> @@ -253,7 +253,7 @@ enum
>         ID_CONTROLLER_DECK_STATE = 9
>  };
>  
> -/* String attribute idenitifiers */
> +/* String attribute identifiers */
>  enum {
>         ATTRIB_STR_BOARD_SERIAL,
>         ATTRIB_STR_UNIT_SERIAL,
> diff --git a/drivers/hid/intel-ish-hid/ishtp-fw-loader.c
> b/drivers/hid/intel-ish-hid/ishtp-fw-loader.c
> index e157863a8b25..750bfdd26ddb 100644
> --- a/drivers/hid/intel-ish-hid/ishtp-fw-loader.c
> +++ b/drivers/hid/intel-ish-hid/ishtp-fw-loader.c
> @@ -793,7 +793,7 @@ static int load_fw_from_host(struct ishtp_cl_data
> *client_data)
>         if (rv < 0)
>                 goto end_err_fw_release;
>  
> -       /* Step 3: Start ISH main firmware exeuction */
> +       /* Step 3: Start ISH main firmware execution */
>  
>         rv = ish_fw_start(client_data);
>         if (rv < 0)
> diff --git a/drivers/hid/intel-ish-hid/ishtp/client.c
> b/drivers/hid/intel-ish-hid/ishtp/client.c
> index 8a7f2f6a4f86..e61b01e9902e 100644
> --- a/drivers/hid/intel-ish-hid/ishtp/client.c
> +++ b/drivers/hid/intel-ish-hid/ishtp/client.c
> @@ -863,7 +863,7 @@ static void ipc_tx_send(void *prm)
>                         /* Send ipc fragment */
>                         ishtp_hdr.length = dev->mtu;
>                         ishtp_hdr.msg_complete = 0;
> -                       /* All fregments submitted to IPC queue with
> no callback */
> +                       /* All fragments submitted to IPC queue with
> no callback */
>                         ishtp_write_message(dev, &ishtp_hdr, pmsg);
>                         cl->tx_offs += dev->mtu;
>                         rem = cl_msg->send_buf.size - cl->tx_offs;
> diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-
> core.c
> index cb687ea7325c..956b86737b07 100644
> --- a/drivers/hid/usbhid/hid-core.c
> +++ b/drivers/hid/usbhid/hid-core.c
> @@ -1100,7 +1100,7 @@ static int usbhid_start(struct hid_device *hid)
>  
>                 interval = endpoint->bInterval;
>  
> -               /* Some vendors give fullspeed interval on highspeed
> devides */
> +               /* Some vendors give fullspeed interval on highspeed
> devices */
>                 if (hid->quirks & HID_QUIRK_FULLSPEED_INTERVAL &&
>                     dev->speed == USB_SPEED_HIGH) {
>                         interval = fls(endpoint->bInterval*8);


^ permalink raw reply

* [PATCH v1] HID: Fix typo in the comment
From: Yan Zhen @ 2024-09-24 11:50 UTC (permalink / raw)
  To: jikos, bentiss, bonbons, jic23, srinivas.pandruvada
  Cc: lains, hadess, linux-input, linux-kernel, linux-iio, linux-usb,
	opensource.kernel, Yan Zhen

Correctly spelled comments make it easier for the reader to understand
the code.

Fix typos:
'mninum' -> 'minimum',
'destoyed' -> 'destroyed',
'thridparty' -> 'thirdparty',
'lowcase' -> 'lowercase',
'idenitifiers' -> 'identifiers',
'exeuction' -> 'execution',
'fregments' -> 'fragments',
'devides' -> 'devices'.

Signed-off-by: Yan Zhen <yanzhen@vivo.com>
---
 drivers/hid/hid-asus.c                      | 2 +-
 drivers/hid/hid-logitech-hidpp.c            | 2 +-
 drivers/hid/hid-picolcd_fb.c                | 2 +-
 drivers/hid/hid-sensor-custom.c             | 2 +-
 drivers/hid/hid-steam.c                     | 2 +-
 drivers/hid/intel-ish-hid/ishtp-fw-loader.c | 2 +-
 drivers/hid/intel-ish-hid/ishtp/client.c    | 2 +-
 drivers/hid/usbhid/hid-core.c               | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index a4b47319ad8e..506c6f377e7d 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -1183,7 +1183,7 @@ static const __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 
 	if (drvdata->quirks & QUIRK_G752_KEYBOARD &&
 		 *rsize == 75 && rdesc[61] == 0x15 && rdesc[62] == 0x00) {
-		/* report is missing usage mninum and maximum */
+		/* report is missing usage minimum and maximum */
 		__u8 *new_rdesc;
 		size_t new_size = *rsize + sizeof(asus_g752_fixed_rdesc);
 
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index 0e33fa0eb8db..d6d066c89c0b 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -2522,7 +2522,7 @@ static void hidpp_ff_work_handler(struct work_struct *w)
 			/* regular effect destroyed */
 			data->effect_ids[wd->params[0]-1] = -1;
 		else if (wd->effect_id >= HIDPP_FF_EFFECTID_AUTOCENTER)
-			/* autocenter spring destoyed */
+			/* autocenter spring destroyed */
 			data->slot_autocenter = 0;
 		break;
 	case HIDPP_FF_SET_GLOBAL_GAINS:
diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c
index 83e3409d170c..f8b16a82faef 100644
--- a/drivers/hid/hid-picolcd_fb.c
+++ b/drivers/hid/hid-picolcd_fb.c
@@ -296,7 +296,7 @@ static void picolcd_fb_destroy(struct fb_info *info)
 	/* make sure no work is deferred */
 	fb_deferred_io_cleanup(info);
 
-	/* No thridparty should ever unregister our framebuffer! */
+	/* No thirdparty should ever unregister our framebuffer! */
 	WARN_ON(fbdata->picolcd != NULL);
 
 	vfree((u8 *)info->fix.smem_start);
diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c
index 66f0675df24b..617ae240396d 100644
--- a/drivers/hid/hid-sensor-custom.c
+++ b/drivers/hid/hid-sensor-custom.c
@@ -946,7 +946,7 @@ hid_sensor_register_platform_device(struct platform_device *pdev,
 
 	memcpy(real_usage, match->luid, 4);
 
-	/* usage id are all lowcase */
+	/* usage id are all lowercase */
 	for (c = real_usage; *c != '\0'; c++)
 		*c = tolower(*c);
 
diff --git a/drivers/hid/hid-steam.c b/drivers/hid/hid-steam.c
index bf8b633114be..6439913372a8 100644
--- a/drivers/hid/hid-steam.c
+++ b/drivers/hid/hid-steam.c
@@ -253,7 +253,7 @@ enum
 	ID_CONTROLLER_DECK_STATE = 9
 };
 
-/* String attribute idenitifiers */
+/* String attribute identifiers */
 enum {
 	ATTRIB_STR_BOARD_SERIAL,
 	ATTRIB_STR_UNIT_SERIAL,
diff --git a/drivers/hid/intel-ish-hid/ishtp-fw-loader.c b/drivers/hid/intel-ish-hid/ishtp-fw-loader.c
index e157863a8b25..750bfdd26ddb 100644
--- a/drivers/hid/intel-ish-hid/ishtp-fw-loader.c
+++ b/drivers/hid/intel-ish-hid/ishtp-fw-loader.c
@@ -793,7 +793,7 @@ static int load_fw_from_host(struct ishtp_cl_data *client_data)
 	if (rv < 0)
 		goto end_err_fw_release;
 
-	/* Step 3: Start ISH main firmware exeuction */
+	/* Step 3: Start ISH main firmware execution */
 
 	rv = ish_fw_start(client_data);
 	if (rv < 0)
diff --git a/drivers/hid/intel-ish-hid/ishtp/client.c b/drivers/hid/intel-ish-hid/ishtp/client.c
index 8a7f2f6a4f86..e61b01e9902e 100644
--- a/drivers/hid/intel-ish-hid/ishtp/client.c
+++ b/drivers/hid/intel-ish-hid/ishtp/client.c
@@ -863,7 +863,7 @@ static void ipc_tx_send(void *prm)
 			/* Send ipc fragment */
 			ishtp_hdr.length = dev->mtu;
 			ishtp_hdr.msg_complete = 0;
-			/* All fregments submitted to IPC queue with no callback */
+			/* All fragments submitted to IPC queue with no callback */
 			ishtp_write_message(dev, &ishtp_hdr, pmsg);
 			cl->tx_offs += dev->mtu;
 			rem = cl_msg->send_buf.size - cl->tx_offs;
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index cb687ea7325c..956b86737b07 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -1100,7 +1100,7 @@ static int usbhid_start(struct hid_device *hid)
 
 		interval = endpoint->bInterval;
 
-		/* Some vendors give fullspeed interval on highspeed devides */
+		/* Some vendors give fullspeed interval on highspeed devices */
 		if (hid->quirks & HID_QUIRK_FULLSPEED_INTERVAL &&
 		    dev->speed == USB_SPEED_HIGH) {
 			interval = fls(endpoint->bInterval*8);
-- 
2.34.1


^ permalink raw reply related

* [git pull] Input updates for v6.12-rc0
From: Dmitry Torokhov @ 2024-09-24 10:59 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-input

Hi Linus,

Please pull from:

	git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git tags/input-for-v6.12-rc0

to receive updates for the input subsystem. You will get:

- support for PixArt PS/2 touchpad

- updates to tsc2004/5, usbtouchscreen, and zforce_ts drivers 

- support for GPIO-only mode for ADP55888 controller

- support for touch keys in Zinitix driver

- support for querying density of Synaptics sensors

- sysfs interface for Goodex "Berlin" devices to read and write touch IC
  registers

- more quirks to i8042 to handle various Tuxedo laptops

- a number of drivers have been converted to using "guard" notation
  when acquiring various locks, as well as using other cleanup functions
  to simplify releasing of resources (with more drivers to follow)

- evdev will limit amount of data that can be written into an evdev
  instance at a given time to 4096 bytes (170 input events) to avoid
  holding evdev->mutex for too long and starving other users

- Spitz has been converted to use software nodes/properties to describe
  its matrix keypad and GPIO-connected LEDs

- msc5000_ts, msc_touchkey and keypad-nomadik-ske drivers have been
  removed since noone in mainline have been using them

- other assorted cleanups and fixes.
  
Changelog:
---------

Binbin Zhou (1):
      Input: Add driver for PixArt PS/2 touchpad

Cai Huoqing (1):
      Input: colibri-vf50-ts - make use of the helper function dev_err_probe()

Charles Wang (1):
      Input: goodix-berlin - add sysfs interface for reading and writing touch IC registers

Christophe JAILLET (1):
      Input: spear-keyboard - switch to devm_clk_get_prepared()

David Lechner (1):
      Input: ims-pcu - fix calling interruptible mutex

Dmitry Torokhov (59):
      Input: usbtouchscreen - use driver core to instantiate device attributes
      Input: usbtouchscreen - remove custom USB_DEVICE_HID_CLASS macro
      Input: usbtouchscreen - move the driver ID table
      Input: usbtouchscreen - move process_pkt() into main device structure
      Input: usbtouchscreen - constify usbtouch_dev_info table
      Input: usbtouchscreen - split device info table into individual pieces
      Input: usbtouchscreen - use guard notation when acquiring mutexes
      Input: usbtouchscreen - switch to using __free() cleanup facility
      Input: msc5000_ts - remove the driver
      Input: msc_touchkey - remove the driver
      MAINTAINERS: update entry for Yealink driver
      Input: tsc2004/5 - fix handling of VIO power supply
      Input: tsc2004/5 - do not hard code interrupt trigger
      Input: tsc2004/5 - fix reset handling on probe
      Input: tsc2004/5 - do not use irq_set_irq_wake() directly
      Input: tsc2004/5 - respect "wakeup-source" property
      Input: tsc2004/5 - use guard notation when acquiring mutexes/locks
      Input: ilitek_ts_i2c - stop including gpio.h
      Input: cyttsp - stop including gpio.h
      Input: cyttsp - use devm_regulator_bulk_get_enable()
      Input: cyttsp4 - remove driver
      Input: keypad-nomadik-ske - remove the driver
      Input: evdev - limit amount of data for writes
      Input: mt6779-keypad - use devm_clk_get_enabled()
      Input: adp5588-keys - use guard notation when acquiring mutexes
      Input: matrix-keymap - switch to using __free() cleanup facility
      Input: bcm5974 - use guard notation when acquiring mutex
      MAINTAINERS: add gameport.h, serio.h and uinput.h to INPUT section
      MAINTAINERS: add i8042.h and libps2.h to INPUT section
      Input: snvs_pwrkey - use devm_clk_get_optional_enabled()
      Input: synaptics-rmi4 - fix crash when DPM query is not supported
      Input: matrix_keypad - remove support for clustered interrupt
      Input: matrix_keypad - switch to gpiod API and generic device properties
      ARM: spitz: Use software nodes/properties for the GPIO-driven buttons
      ARM: spitz: Use software nodes/properties for the matrix keypad
      Input: matrix_keypad - remove support for platform data
      Input: alps - use guard notation when acquiring mutex
      Input: atkbd - use guard notation when acquiring mutex
      Input: gpio-keys - switch to using cleanup functions
      Input: iqs62x-keys - use cleanup facility for fwnodes
      Input: tegra-kbc - use guard notation when acquiring mutex and spinlock
      Input: zforce_ts - simplify reporting of slot state
      Input: zforce_ts - remove support for platfrom data
      Input: zforce_ts - do not explicitly set EV_SYN, etc bits
      Input: zforce_ts - handle errors from input_mt_init_sots()
      Input: zforce_ts - remove unneeded locking
      Input: zforce_ts - ensure that pm_stay_awake() and pm_relax() are balanced
      Input: zforce_ts - use guard notation when acquiring mutexes
      Input: zforce_ts - switch to using get_unaligned_le16
      Input: zforce_ts - make parsing of contacts less confusing
      Input: zforce_ts - do not ignore errors when acquiring regulator
      Input: zforce_ts - use dev_err_probe() where appropriate
      Input: zforce_ts - make zforce_idtable constant
      Input: zforce_ts - stop treating VDD regulator as optional
      Input: zforce_ts - switch to using devm_regulator_get_enable()
      Input: zforce_ts - do not hardcode interrupt level
      Input: zforce_ts - remove assert/deassert wrappers
      Input: zforce_ts - switch to using asynchronous probing
      ARM: spitz: fix compile error when matrix keypad driver is enabled

Emanuele Ghidoli (2):
      Input: ilitek_ts_i2c - avoid wrong input subsystem sync
      Input: ilitek_ts_i2c - add report id message validation

Fabio Estevam (1):
      dt-bindings: input: touchscreen: Use generic node name

Frank Li (4):
      dt-bindings: input: touchscreen: convert ad7879 to yaml format
      dt-bindings: input: touchscreen: convert colibri-vf50-ts.txt to yaml
      dt-bindings: input: touchscreen: convert ads7846.txt to yaml
      dt-bindings: input: convert rotary-encoder to yaml

Jacky Bai (1):
      Input: bbnsm_pwrkey - fix missed key press after suspend

Javier Carrasco (6):
      Input: iqs269a - use device_for_each_child_node_scoped()
      Input: qt1050 - use device_for_each_child_node_scoped()
      Input: gpio_keys - use device_for_each_child_node_scoped()
      Input: gpio_keys_polled - use device_for_each_child_node_scoped()
      Input: adc-keys - use device_for_each_child_node_scoped()
      Input: adc-joystick - use device_for_each_child_node_scoped()

Jinjie Ruan (1):
      Input: ps2-gpio - use IRQF_NO_AUTOEN flag in request_irq()

Liao Chen (1):
      Input: mt6779-keypad - fix module autoloading

Linus Walleij (2):
      Input: zinitix - read and cache device version numbers
      Input: zinitix - varying icon status registers

Lukas Bulwahn (1):
      MAINTAINERS: remove unneeded file entry in INPUT section

Marge Yang (1):
      Input: synaptics-rmi4 - add support for querying DPM value (F12)

Nikita Travkin (2):
      dt-bindings: input: zinitix: Document touch-keys support
      Input: zinitix - add touchkey support

Nuno Sa (1):
      Input: adp5588-keys - fix check on return code

Rob Herring (Arm) (2):
      Input: tc3589x - use of_property_present()
      Input: tegra-kbc - use of_property_read_variable_u32_array() and of_property_present()

Shen Lichuan (2):
      Input: wistron_btns - use kmemdup_array instead of kmemdup for multiple allocation
      Input: Convert comma to semicolon

Sudip Mukherjee (1):
      Input: zforce_ts - use devm_add_action_or_reset()

Utsav Agarwal (2):
      Input: adp5588-keys - add support for pure gpio
      dt-bindings: input: pure gpio support for adp5588

Uwe Kleine-König (1):
      Input: hynitron_cstxxx - drop explicit initialization of struct i2c_device_id::driver_data to 0

Werner Sembach (3):
      Input: i8042 - add TUXEDO Stellaris 16 Gen5 AMD to i8042 quirk table
      Input: i8042 - add another board name for TUXEDO Stellaris Gen5 AMD line
      Input: i8042 - add TUXEDO Stellaris 15 Slim Gen6 AMD to i8042 quirk table

Diffstat:
--------

 .../devicetree/bindings/input/adi,adp5588.yaml     |   38 +-
 .../devicetree/bindings/input/rotary-encoder.txt   |   50 -
 .../devicetree/bindings/input/rotary-encoder.yaml  |   90 +
 .../bindings/input/touchscreen/ad7879.txt          |   71 -
 .../bindings/input/touchscreen/adi,ad7879.yaml     |  150 ++
 .../bindings/input/touchscreen/ads7846.txt         |  107 -
 .../bindings/input/touchscreen/azoteq,iqs7211.yaml |    4 +-
 .../bindings/input/touchscreen/colibri-vf50-ts.txt |   34 -
 .../bindings/input/touchscreen/edt-ft5x06.yaml     |    2 +-
 .../bindings/input/touchscreen/goodix.yaml         |    2 +-
 .../bindings/input/touchscreen/ti,ads7843.yaml     |  183 ++
 .../touchscreen/toradex,vf50-touchscreen.yaml      |   77 +
 .../bindings/input/touchscreen/zinitix,bt400.yaml  |   10 +
 .../devicetree/bindings/power/wakeup-source.txt    |    2 +-
 MAINTAINERS                                        |    8 +-
 arch/arm/mach-pxa/spitz.c                          |  163 +-
 drivers/input/evdev.c                              |    7 +
 drivers/input/input.c                              |    2 +-
 drivers/input/joystick/adc-joystick.c              |   16 +-
 drivers/input/keyboard/Kconfig                     |   23 -
 drivers/input/keyboard/Makefile                    |    2 -
 drivers/input/keyboard/adc-keys.c                  |    5 +-
 drivers/input/keyboard/adp5588-keys.c              |   99 +-
 drivers/input/keyboard/atkbd.c                     |   37 +-
 drivers/input/keyboard/gpio_keys.c                 |   48 +-
 drivers/input/keyboard/gpio_keys_polled.c          |    4 +-
 drivers/input/keyboard/iqs62x-keys.c               |    7 +-
 drivers/input/keyboard/matrix_keypad.c             |  334 ++-
 drivers/input/keyboard/mcs_touchkey.c              |  268 ---
 drivers/input/keyboard/mt6779-keypad.c             |   19 +-
 drivers/input/keyboard/nomadik-ske-keypad.c        |  378 ----
 drivers/input/keyboard/qt1050.c                    |   15 +-
 drivers/input/keyboard/snvs_pwrkey.c               |   24 +-
 drivers/input/keyboard/spear-keyboard.c            |   16 +-
 drivers/input/keyboard/tc3589x-keypad.c            |    3 +-
 drivers/input/keyboard/tegra-kbc.c                 |  117 +-
 drivers/input/matrix-keymap.c                      |   25 +-
 drivers/input/misc/ims-pcu.c                       |    2 +-
 drivers/input/misc/iqs269a.c                       |    7 +-
 drivers/input/misc/nxp-bbnsm-pwrkey.c              |   38 +
 drivers/input/misc/wistron_btns.c                  |    4 +-
 drivers/input/mouse/Kconfig                        |   12 +
 drivers/input/mouse/Makefile                       |    1 +
 drivers/input/mouse/alps.c                         |   48 +-
 drivers/input/mouse/bcm5974.c                      |   35 +-
 drivers/input/mouse/pixart_ps2.c                   |  300 +++
 drivers/input/mouse/pixart_ps2.h                   |   36 +
 drivers/input/mouse/psmouse-base.c                 |   17 +
 drivers/input/mouse/psmouse.h                      |    3 +-
 drivers/input/rmi4/rmi_f12.c                       |   43 +-
 drivers/input/serio/i8042-acpipnpio.h              |   37 +
 drivers/input/serio/ps2-gpio.c                     |    6 +-
 drivers/input/touchscreen/Kconfig                  |   42 -
 drivers/input/touchscreen/Makefile                 |    6 +-
 drivers/input/touchscreen/colibri-vf50-ts.c        |   10 +-
 drivers/input/touchscreen/cyttsp4_core.c           | 2174 --------------------
 drivers/input/touchscreen/cyttsp4_core.h           |  448 ----
 drivers/input/touchscreen/cyttsp4_i2c.c            |   72 -
 drivers/input/touchscreen/cyttsp4_spi.c            |  187 --
 drivers/input/touchscreen/cyttsp_core.c            |   39 +-
 drivers/input/touchscreen/cyttsp_core.h            |    5 -
 drivers/input/touchscreen/cyttsp_i2c.c             |   55 +
 drivers/input/touchscreen/cyttsp_i2c_common.c      |   86 -
 drivers/input/touchscreen/goodix_berlin.h          |    1 +
 drivers/input/touchscreen/goodix_berlin_core.c     |   43 +
 drivers/input/touchscreen/goodix_berlin_i2c.c      |    1 +
 drivers/input/touchscreen/goodix_berlin_spi.c      |    1 +
 drivers/input/touchscreen/hynitron_cstxxx.c        |    2 +-
 drivers/input/touchscreen/ilitek_ts_i2c.c          |   19 +-
 drivers/input/touchscreen/mcs5000_ts.c             |  288 ---
 drivers/input/touchscreen/tsc2004.c                |    6 -
 drivers/input/touchscreen/tsc2005.c                |    6 -
 drivers/input/touchscreen/tsc200x-core.c           |  249 +--
 drivers/input/touchscreen/tsc200x-core.h           |    1 -
 drivers/input/touchscreen/usbtouchscreen.c         |  956 ++++-----
 drivers/input/touchscreen/zforce_ts.c              |  474 ++---
 drivers/input/touchscreen/zinitix.c                |  134 +-
 include/linux/input/matrix_keypad.h                |   48 -
 include/linux/platform_data/cyttsp4.h              |   62 -
 include/linux/platform_data/keypad-nomadik-ske.h   |   50 -
 include/linux/platform_data/mcs.h                  |   30 -
 include/linux/platform_data/zforce_ts.h            |   15 -
 82 files changed, 2501 insertions(+), 6038 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/input/rotary-encoder.txt
 create mode 100644 Documentation/devicetree/bindings/input/rotary-encoder.yaml
 delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/ad7879.txt
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/adi,ad7879.yaml
 delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/ads7846.txt
 delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/colibri-vf50-ts.txt
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/toradex,vf50-touchscreen.yaml
 delete mode 100644 drivers/input/keyboard/mcs_touchkey.c
 delete mode 100644 drivers/input/keyboard/nomadik-ske-keypad.c
 create mode 100644 drivers/input/mouse/pixart_ps2.c
 create mode 100644 drivers/input/mouse/pixart_ps2.h
 delete mode 100644 drivers/input/touchscreen/cyttsp4_core.c
 delete mode 100644 drivers/input/touchscreen/cyttsp4_core.h
 delete mode 100644 drivers/input/touchscreen/cyttsp4_i2c.c
 delete mode 100644 drivers/input/touchscreen/cyttsp4_spi.c
 delete mode 100644 drivers/input/touchscreen/cyttsp_i2c_common.c
 delete mode 100644 drivers/input/touchscreen/mcs5000_ts.c
 delete mode 100644 include/linux/platform_data/cyttsp4.h
 delete mode 100644 include/linux/platform_data/keypad-nomadik-ske.h
 delete mode 100644 include/linux/platform_data/mcs.h
 delete mode 100644 include/linux/platform_data/zforce_ts.h

Thanks.


-- 
Dmitry

^ permalink raw reply

* Re: [PATCH] hid: hid-lenovo: Supporting TP-X12-TAB-1/2 Kbd Hotkeys using raw events.
From: Vishnu Sankar @ 2024-09-24 10:37 UTC (permalink / raw)
  To: kernel test robot
  Cc: jikos, bentiss, linux-input, linux-kernel, oe-kbuild-all,
	mpearson-lenovo, vsankar
In-Reply-To: <202409211318.ZsE7JGOi-lkp@intel.com>

Sorry for the inconvenience.
The base I used was the Master branch.

Should I resubmit this patch again with the base as linus/master next-2024xxxx?

On Sat, Sep 21, 2024 at 3:19 PM kernel test robot <lkp@intel.com> wrote:
>
> Hi Vishnu,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on hid/for-next]
> [also build test ERROR on linus/master next-20240920]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Vishnu-Sankar/hid-hid-lenovo-Supporting-TP-X12-TAB-1-2-Kbd-Hotkeys-using-raw-events/20240917-180639
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
> patch link:    https://lore.kernel.org/r/20240917100432.10887-1-vishnuocv%40gmail.com
> patch subject: [PATCH] hid: hid-lenovo: Supporting TP-X12-TAB-1/2 Kbd Hotkeys using raw  events.
> config: i386-randconfig-062-20240921 (https://download.01.org/0day-ci/archive/20240921/202409211318.ZsE7JGOi-lkp@intel.com/config)
> compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240921/202409211318.ZsE7JGOi-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202409211318.ZsE7JGOi-lkp@intel.com/
>
> All errors (new ones prefixed by >>, old ones prefixed by <<):
>
> WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/locking/test-ww_mutex.o
> WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_powersave.o
> >> ERROR: modpost: "platform_profile_cycle" [drivers/hid/hid-lenovo.ko] undefined!
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki



-- 

Regards,

      Vishnu Sankar
     +817015150407 (Japan)

^ permalink raw reply

* [dtor-input:for-linus] BUILD SUCCESS 358800b702506c829c8ce21c125420d2abce2090
From: kernel test robot @ 2024-09-24 10:01 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input

tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git for-linus
branch HEAD: 358800b702506c829c8ce21c125420d2abce2090  ARM: spitz: fix compile error when matrix keypad driver is enabled

elapsed time: 1444m

configs tested: 166
configs skipped: 2

The following configs have been built successfully.
More configs may be tested in the coming days.

tested configs:
alpha                             allnoconfig    gcc-13.3.0
alpha                             allnoconfig    gcc-14.1.0
alpha                            allyesconfig    clang-20
alpha                            allyesconfig    gcc-13.3.0
alpha                               defconfig    clang-20
arc                              allmodconfig    gcc-13.2.0
arc                               allnoconfig    gcc-13.2.0
arc                               allnoconfig    gcc-14.1.0
arc                              allyesconfig    gcc-13.2.0
arc                            hsdk_defconfig    clang-20
arc                   randconfig-001-20240923    gcc-13.2.0
arc                   randconfig-002-20240923    gcc-13.2.0
arm                              allmodconfig    gcc-14.1.0
arm                               allnoconfig    clang-20
arm                               allnoconfig    gcc-14.1.0
arm                              allyesconfig    gcc-14.1.0
arm                       imx_v4_v5_defconfig    clang-20
arm                   randconfig-001-20240923    gcc-14.1.0
arm                   randconfig-002-20240923    clang-20
arm                   randconfig-003-20240923    clang-20
arm                   randconfig-004-20240923    gcc-14.1.0
arm                           stm32_defconfig    clang-20
arm64                            allmodconfig    clang-20
arm64                             allnoconfig    gcc-14.1.0
arm64                 randconfig-001-20240923    clang-20
arm64                 randconfig-002-20240923    clang-20
arm64                 randconfig-003-20240923    clang-20
arm64                 randconfig-004-20240923    clang-20
csky                              allnoconfig    gcc-14.1.0
csky                  randconfig-001-20240923    gcc-14.1.0
csky                  randconfig-002-20240923    gcc-14.1.0
hexagon                          allmodconfig    clang-20
hexagon                           allnoconfig    clang-20
hexagon                           allnoconfig    gcc-14.1.0
hexagon                          allyesconfig    clang-20
hexagon               randconfig-001-20240923    clang-15
hexagon               randconfig-002-20240923    clang-20
i386                             allmodconfig    clang-18
i386                             allmodconfig    gcc-12
i386                              allnoconfig    clang-18
i386                              allnoconfig    gcc-12
i386                             allyesconfig    clang-18
i386                             allyesconfig    gcc-12
i386        buildonly-randconfig-001-20240923    clang-18
i386        buildonly-randconfig-002-20240923    clang-18
i386        buildonly-randconfig-003-20240923    gcc-12
i386        buildonly-randconfig-004-20240923    clang-18
i386        buildonly-randconfig-005-20240923    gcc-12
i386        buildonly-randconfig-006-20240923    clang-18
i386                                defconfig    clang-18
i386                  randconfig-001-20240923    clang-18
i386                  randconfig-002-20240923    clang-18
i386                  randconfig-003-20240923    clang-18
i386                  randconfig-004-20240923    gcc-12
i386                  randconfig-005-20240923    gcc-11
i386                  randconfig-006-20240923    clang-18
i386                  randconfig-011-20240923    clang-18
i386                  randconfig-012-20240923    gcc-12
i386                  randconfig-013-20240923    gcc-12
i386                  randconfig-014-20240923    gcc-12
i386                  randconfig-015-20240923    gcc-12
i386                  randconfig-016-20240923    gcc-12
loongarch                        allmodconfig    gcc-14.1.0
loongarch                         allnoconfig    gcc-14.1.0
loongarch             randconfig-001-20240923    gcc-14.1.0
loongarch             randconfig-002-20240923    gcc-14.1.0
m68k                             allmodconfig    gcc-14.1.0
m68k                              allnoconfig    gcc-14.1.0
m68k                             allyesconfig    gcc-14.1.0
microblaze                       allmodconfig    gcc-14.1.0
microblaze                        allnoconfig    gcc-14.1.0
microblaze                       allyesconfig    gcc-14.1.0
mips                              allnoconfig    gcc-14.1.0
mips                      bmips_stb_defconfig    clang-20
mips                     cu1830-neo_defconfig    clang-20
nios2                             allnoconfig    gcc-14.1.0
nios2                 randconfig-001-20240923    gcc-14.1.0
nios2                 randconfig-002-20240923    gcc-14.1.0
openrisc                          allnoconfig    clang-20
openrisc                          allnoconfig    gcc-14.1.0
openrisc                            defconfig    gcc-14.1.0
parisc                            allnoconfig    clang-20
parisc                            allnoconfig    gcc-14.1.0
parisc                              defconfig    gcc-14.1.0
parisc                generic-32bit_defconfig    clang-20
parisc                randconfig-001-20240923    gcc-14.1.0
parisc                randconfig-002-20240923    gcc-14.1.0
powerpc                           allnoconfig    clang-20
powerpc                           allnoconfig    gcc-14.1.0
powerpc                        fsp2_defconfig    clang-20
powerpc                         ps3_defconfig    clang-20
powerpc               randconfig-001-20240923    clang-20
powerpc               randconfig-002-20240923    clang-20
powerpc               randconfig-003-20240923    gcc-14.1.0
powerpc                      tqm8xx_defconfig    clang-20
powerpc64                        alldefconfig    clang-20
powerpc64             randconfig-001-20240923    clang-20
powerpc64             randconfig-002-20240923    clang-20
powerpc64             randconfig-003-20240923    gcc-14.1.0
riscv                             allnoconfig    clang-20
riscv                             allnoconfig    gcc-14.1.0
riscv                               defconfig    clang-20
riscv                    nommu_k210_defconfig    clang-20
riscv                 randconfig-001-20240923    gcc-14.1.0
riscv                 randconfig-002-20240923    gcc-14.1.0
s390                             allmodconfig    clang-20
s390                             allmodconfig    gcc-14.1.0
s390                              allnoconfig    clang-20
s390                             allyesconfig    gcc-14.1.0
s390                                defconfig    clang-20
s390                  randconfig-001-20240923    gcc-14.1.0
s390                  randconfig-002-20240923    gcc-14.1.0
sh                               allmodconfig    gcc-14.1.0
sh                                allnoconfig    gcc-14.1.0
sh                               allyesconfig    gcc-14.1.0
sh                         ap325rxa_defconfig    clang-20
sh                         apsh4a3a_defconfig    clang-20
sh                                  defconfig    gcc-14.1.0
sh                          polaris_defconfig    clang-20
sh                    randconfig-001-20240923    gcc-14.1.0
sh                    randconfig-002-20240923    gcc-14.1.0
sh                          rsk7264_defconfig    clang-20
sh                   rts7751r2dplus_defconfig    clang-20
sparc                            allmodconfig    gcc-14.1.0
sparc64                             defconfig    gcc-14.1.0
um                               allmodconfig    clang-20
um                                allnoconfig    clang-17
um                                allnoconfig    clang-20
um                               allyesconfig    clang-20
um                               allyesconfig    gcc-12
um                                  defconfig    clang-20
um                             i386_defconfig    gcc-12
um                           x86_64_defconfig    clang-15
x86_64                            allnoconfig    clang-18
x86_64                           allyesconfig    clang-18
x86_64      buildonly-randconfig-001-20240924    gcc-12
x86_64      buildonly-randconfig-002-20240924    gcc-12
x86_64      buildonly-randconfig-003-20240924    clang-18
x86_64      buildonly-randconfig-004-20240924    clang-18
x86_64      buildonly-randconfig-005-20240924    clang-18
x86_64      buildonly-randconfig-006-20240924    clang-18
x86_64                              defconfig    clang-18
x86_64                              defconfig    gcc-11
x86_64                                  kexec    clang-18
x86_64                                  kexec    gcc-12
x86_64                randconfig-001-20240924    clang-18
x86_64                randconfig-002-20240924    gcc-12
x86_64                randconfig-003-20240924    gcc-12
x86_64                randconfig-004-20240924    gcc-12
x86_64                randconfig-005-20240924    clang-18
x86_64                randconfig-006-20240924    clang-18
x86_64                randconfig-011-20240924    gcc-12
x86_64                randconfig-012-20240924    gcc-12
x86_64                randconfig-013-20240924    gcc-11
x86_64                randconfig-014-20240924    clang-18
x86_64                randconfig-015-20240924    gcc-12
x86_64                randconfig-016-20240924    clang-18
x86_64                randconfig-071-20240924    gcc-12
x86_64                randconfig-072-20240924    clang-18
x86_64                randconfig-073-20240924    gcc-12
x86_64                randconfig-074-20240924    gcc-12
x86_64                randconfig-075-20240924    gcc-12
x86_64                randconfig-076-20240924    clang-18
x86_64                               rhel-8.3    gcc-12
x86_64                          rhel-8.3-rust    clang-18
xtensa                            allnoconfig    gcc-14.1.0

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply

* RE: [PATCH] HID: plantronics: Update to map micmute controls
From: Wang, Wade @ 2024-09-24  9:00 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: jikos@kernel.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
In-Reply-To: <EA2PR84MB378051BB14F857BA84E662818B602@EA2PR84MB3780.NAMPRD84.PROD.OUTLOOK.COM>

Hi Benjamin and Greg,

May I know the review progress and anything I need to change? Thanks

Regards
Wade

-----Original Message-----
From: Wang, Wade 
Sent: Monday, September 16, 2024 4:13 PM
To: Benjamin Tissoires <bentiss@kernel.org>
Cc: jikos@kernel.org; linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; stable@vger.kernel.org
Subject: RE: [PATCH] HID: plantronics: Update to map micmute controls

Hi Benjamin,

This patch is for all Poly HS devices, and it does not depends on other patches, it can apply directly by " git am -3".

With this patch, MicMute button key event will be send to user space, I have tested on the below Poly devices:
        Plantronics EncorePro 500 Series
        Plantronics Blackwire_3325 Series
        Poly Voyager 4320 HS + BT700 Dongle

Regards
Wade

-----Original Message-----
From: Benjamin Tissoires <bentiss@kernel.org>
Sent: Friday, September 13, 2024 10:04 PM
To: Wang, Wade <wade.wang@hp.com>
Cc: jikos@kernel.org; linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; stable@vger.kernel.org
Subject: Re: [PATCH] HID: plantronics: Update to map micmute controls

CAUTION: External Email

On Sep 13 2024, Wade Wang wrote:
> telephony page of Plantronics headset is ignored currently, it caused 
> micmute button no function, Now follow native HID key mapping for 
> telephony page map, telephony micmute key is enabled by default

For which devices this patch is required? Is it related to the other patch you sent today? If so please make a mention of the concerned devices and make sure both patches are sent in a single v3 series.

Also, have you tested this change with other Plantronics headsets? Where there any changes in behavior from them?

Cheers,
Benjamin

>
> Cc: stable@vger.kernel.org
> Signed-off-by: Wade Wang <wade.wang@hp.com>
> ---
>  drivers/hid/hid-plantronics.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hid/hid-plantronics.c 
> b/drivers/hid/hid-plantronics.c index 2a19f3646ecb..2d17534fce61 
> 100644
> --- a/drivers/hid/hid-plantronics.c
> +++ b/drivers/hid/hid-plantronics.c
> @@ -77,10 +77,10 @@ static int plantronics_input_mapping(struct hid_device *hdev,
>               }
>       }
>       /* handle standard types - plt_type is 0xffa0uuuu or 0xffa2uuuu */
> -     /* 'basic telephony compliant' - allow default consumer page map */
> +     /* 'basic telephony compliant' - allow default consumer & 
> + telephony page map */
>       else if ((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
>                (plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) {
> -             if (PLT_ALLOW_CONSUMER)
> +             if (PLT_ALLOW_CONSUMER || (usage->hid & HID_USAGE_PAGE) 
> + == HID_UP_TELEPHONY)
>                       goto defaulted;
>       }
>       /* not 'basic telephony' - apply legacy mapping */
> --
> 2.34.1
>


^ permalink raw reply

* Re: [PATCH 3/3] Revert "HID: hyperv: register as a wakeup source"
From: Srivatsa S. Bhat @ 2024-09-24  3:29 UTC (permalink / raw)
  To: Erni Sri Satya Vennela
  Cc: kys, haiyangz, wei.liu, decui, jikos, bentiss, dmitry.torokhov,
	linux-hyperv, linux-input, linux-kernel, ernis, rafael, pavel,
	lenb, linux-pm
In-Reply-To: <1726176470-13133-4-git-send-email-ernis@linux.microsoft.com>

[+linux-pm, Rafael, Len, Pavel]

On Thu, Sep 12, 2024 at 02:27:50PM -0700, Erni Sri Satya Vennela wrote:
> This reverts commit f1210455e78a610c7b316389b31c162c371d888c.
> 
> Remove mouse as wakeup source since Suspend-to-Idle feature
> is disabled.
> 
> Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
> ---
>  drivers/hid/hid-hyperv.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
> index f33485d83d24..b6d0f7db4c93 100644
> --- a/drivers/hid/hid-hyperv.c
> +++ b/drivers/hid/hid-hyperv.c
> @@ -293,9 +293,6 @@ static void mousevsc_on_receive(struct hv_device *device,
>  		memcpy(input_dev->input_buf, input_report->buffer, len);
>  		hid_input_report(input_dev->hid_device, HID_INPUT_REPORT,
>  				 input_dev->input_buf, len, 1);
> -
> -		pm_wakeup_hard_event(&input_dev->device->device);
> -
>  		break;
>  	default:
>  		pr_err("unsupported hid msg type - type %d len %d\n",
> @@ -502,8 +499,6 @@ static int mousevsc_probe(struct hv_device *device,
>  		goto probe_err2;
>  	}
>  
> -	device_init_wakeup(&device->device, true);
> -
>  	input_dev->connected = true;
>  	input_dev->init_complete = true;
>  
> @@ -526,7 +521,6 @@ static void mousevsc_remove(struct hv_device *dev)
>  {
>  	struct mousevsc_dev *input_dev = hv_get_drvdata(dev);
>  
> -	device_init_wakeup(&dev->device, false);
>  	vmbus_close(dev->channel);
>  	hid_hw_stop(input_dev->hid_device);
>  	hid_destroy_device(input_dev->hid_device);
> -- 
> 2.34.1
> 
> 

^ permalink raw reply

* Re: [PATCH 2/3] Revert "Input: hyperv-keyboard - register as a wakeup source"
From: Srivatsa S. Bhat @ 2024-09-24  3:28 UTC (permalink / raw)
  To: Erni Sri Satya Vennela
  Cc: kys, haiyangz, wei.liu, decui, jikos, bentiss, dmitry.torokhov,
	linux-hyperv, linux-input, linux-kernel, ernis, rafael, pavel,
	lenb, linux-pm
In-Reply-To: <1726176470-13133-3-git-send-email-ernis@linux.microsoft.com>

[+linux-pm, Rafael, Len, Pavel]

On Thu, Sep 12, 2024 at 02:27:49PM -0700, Erni Sri Satya Vennela wrote:
> This reverts commit 62238f3aadc9bc56da70100e19ec61b9f8d72a5f.
> 
> Remove keyboard as wakeup source since Suspend-to-Idle feature
> is disabled.
> 
> Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
> ---
>  drivers/input/serio/hyperv-keyboard.c | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input/serio/hyperv-keyboard.c
> index 31d9dacd2fd1..b42c546636bf 100644
> --- a/drivers/input/serio/hyperv-keyboard.c
> +++ b/drivers/input/serio/hyperv-keyboard.c
> @@ -162,15 +162,6 @@ static void hv_kbd_on_receive(struct hv_device *hv_dev,
>  			serio_interrupt(kbd_dev->hv_serio, scan_code, 0);
>  		}
>  		spin_unlock_irqrestore(&kbd_dev->lock, flags);
> -
> -		/*
> -		 * Only trigger a wakeup on key down, otherwise
> -		 * "echo freeze > /sys/power/state" can't really enter the
> -		 * state because the Enter-UP can trigger a wakeup at once.
> -		 */
> -		if (!(info & IS_BREAK))
> -			pm_wakeup_hard_event(&hv_dev->device);
> -
>  		break;
>  
>  	default:
> @@ -356,9 +347,6 @@ static int hv_kbd_probe(struct hv_device *hv_dev,
>  		goto err_close_vmbus;
>  
>  	serio_register_port(kbd_dev->hv_serio);
> -
> -	device_init_wakeup(&hv_dev->device, true);
> -
>  	return 0;
>  
>  err_close_vmbus:
> -- 
> 2.34.1
> 
> 

^ permalink raw reply

* Re: [PATCH 1/3] Drivers: hv: vmbus: Disable Suspend-to-Idle for VMBus
From: Srivatsa S. Bhat @ 2024-09-24  3:27 UTC (permalink / raw)
  To: Erni Sri Satya Vennela
  Cc: kys, haiyangz, wei.liu, decui, jikos, bentiss, dmitry.torokhov,
	linux-hyperv, linux-input, linux-kernel, ernis, Saurabh Sengar,
	rafael, pavel, lenb, linux-pm
In-Reply-To: <1726176470-13133-2-git-send-email-ernis@linux.microsoft.com>

[+linux-pm, Rafael, Len, Pavel]

On Thu, Sep 12, 2024 at 02:27:48PM -0700, Erni Sri Satya Vennela wrote:
> If the Virtual Machine Connection window is focused,
> a Hyper-V VM user can unintentionally touch the keyboard/mouse
> when the VM is hibernating or resuming, and consequently the
> hibernation or resume operation can be aborted unexpectedly.
> Fix the issue by no longer registering the keyboard/mouse as
> wakeup devices (see the other two patches for the
> changes to drivers/input/serio/hyperv-keyboard.c and
> drivers/hid/hid-hyperv.c).
> 
> The keyboard/mouse were registered as wakeup devices because the
> VM needs to be woken up from the Suspend-to-Idle state after
> a user runs "echo freeze > /sys/power/state". It seems like
> the Suspend-to-Idle feature has no real users in practice, so
> let's no longer support that by returning -EOPNOTSUPP if a
> user tries to use that.
> 
> Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
> ---
>  drivers/hv/vmbus_drv.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index 965d2a4efb7e..4efd8856392f 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -900,6 +900,19 @@ static void vmbus_shutdown(struct device *child_device)
>  }
>  
>  #ifdef CONFIG_PM_SLEEP
> +/*
> + * vmbus_freeze - Suspend-to-Idle
> + */
> +static int vmbus_freeze(struct device *child_device)
> +{
> +/*
> + * Do not support Suspend-to-Idle ("echo freeze > /sys/power/state") as
> + * that would require registering the Hyper-V synthetic mouse/keyboard
> + * devices as wakeup devices, which can abort hibernation/resume unexpectedly.
> + */
> +	return -EOPNOTSUPP;
> +}
> +
>  /*
>   * vmbus_suspend - Suspend a vmbus device
>   */
> @@ -969,7 +982,7 @@ static void vmbus_device_release(struct device *device)
>   */
>  
>  static const struct dev_pm_ops vmbus_pm = {
> -	.suspend_noirq	= NULL,
> +	.suspend_noirq  = vmbus_freeze,
>  	.resume_noirq	= NULL,
>  	.freeze_noirq	= vmbus_suspend,
>  	.thaw_noirq	= vmbus_resume,
> -- 
> 2.34.1
> 
> 

^ permalink raw reply

* Re: [PATCH 0/3] Disable Suspend-to-Idle in Hyper-V and Fix Hibernation Interruptions
From: Srivatsa S. Bhat @ 2024-09-24  3:26 UTC (permalink / raw)
  To: Erni Sri Satya Vennela
  Cc: kys, haiyangz, wei.liu, decui, jikos, bentiss, dmitry.torokhov,
	linux-hyperv, linux-input, linux-kernel, ernis, rafael, pavel,
	lenb, linux-pm
In-Reply-To: <1726176470-13133-1-git-send-email-ernis@linux.microsoft.com>

Hi Vennela,

[+linux-pm, Rafael, Pavel, Len]

Let's CC the linux-pm mailing list for discussions related to power
management features (such as suspend/resume and hibernation).

On Thu, Sep 12, 2024 at 02:27:47PM -0700, Erni Sri Satya Vennela wrote:
> It has been reported that Hyper-V VM users can unintentionally abort
> hibernation by mouse or keyboard movements. To address this issue,
> we have decided to remove the wakeup events for the Hyper-V keyboard
> and mouse driver.

From the description of the problem, it doesn't occur to me that this
is specific to Hyper-V. I was wondering if VMs on other hypervisor
platforms wouldn't face the same issue? I'd like to recommend
exploring how this problem has been solved for other platforms, so
that we can reuse the same approach here. (If it turns out that
removing keyboard and mouse wakeup events is the way to go, then
great; otherwise, we can learn and apply the recommended solution).

> However, this change introduces another problem: 
> Suspend-to-Idle brings the system down with no method to wake it back up.
> 
> Given that there are no real users of Suspend-to-Idle in Hyper-V,
> we have decided to disable this feature for VMBus. This results in:
> 
> $echo freeze > /sys/power/state
> > bash: echo: write error: Operation not supported
> 
> The keyboard and mouse were previously registered as wakeup sources to
> interrupt the freeze operation in a VM. Since the freeze operation itself
> is no longer supported, we are disabling them as wakeup events.
> 
> This patchset ensures that the system remains stable and prevents
> unintended interruptions during hibernation.
> 
> Erni Sri Satya Vennela (3):
>   Drivers: hv: vmbus: Disable Suspend-to-Idle for VMBus
>   Revert "Input: hyperv-keyboard - register as a wakeup source"
>   Revert "HID: hyperv: register as a wakeup source"
> 
>  drivers/hid/hid-hyperv.c              |  6 ------
>  drivers/hv/vmbus_drv.c                | 15 ++++++++++++++-
>  drivers/input/serio/hyperv-keyboard.c | 12 ------------
>  3 files changed, 14 insertions(+), 19 deletions(-)
> 
> -- 
> 2.34.1
> 
> 

Regards,
Srivatsa
Microsoft Linux Systems Group

^ permalink raw reply

* Re: [PATCH v2] HID: ishtp-hid-client: replace fake-flex arrays with flex-array members
From: srinivas pandruvada @ 2024-09-23 19:32 UTC (permalink / raw)
  To: Kees Cook
  Cc: Erick Archer, Jiri Kosina, Benjamin Tissoires, linux-kernel,
	linux-input, linux-hardening
In-Reply-To: <20240923002249.it.617-kees@kernel.org>

On Sun, 2024-09-22 at 17:22 -0700, Kees Cook wrote:
> From: Erick Archer <erick.archer@outlook.com>
> 
> One-element arrays as fake flex arrays are deprecated[1] as the
> kernel
> has switched to C99 flexible-array members instead. This case,
> however,
> has more complexity because it is a flexible array of flexible arrays
> and this patch needs to be ready to enable the new compiler flag
> -Wflex-array-member-not-at-end (coming in GCC-14) globally.
> 
> So, define a new struct type for the single reports:
> 
> struct report {
>         uint16_t size;
>         struct hostif_msg_hdr msg;
> } __packed;
> 
> but without the payload (flex array) in it. And add this payload to
> the
> "hostif_msg" structure. This way, in the "report_list" structure we
> can
> declare a flex array of single reports which now do not contain
> another
> flex array.
> 
> struct report_list {
>         [...]
>         struct report reports[];
> } __packed;
> 
> Therefore, the "struct hostif_msg" is now made up of a header and a
> payload. And the "struct report" uses only the "hostif_msg" header.
> The perfect solution would be for the "report" structure to use the
> whole "hostif_msg" structure but this is not possible due to nested
> flexible arrays. Anyway, the end result is equivalent since this
> patch
> does attempt to change the behaviour of the code.
> 
> Now as well, we have more clarity after the cast from the raw bytes
> to
> the new structures. Refactor the code accordingly to use the new
> structures.
> 
> Also, use "container_of()" whenever we need to retrieve a pointer to
> the flexible structure, through which we can access the flexible
> array
> if needed.
> 
> Link:
> https://www.kernel.org/doc/html/next/process/deprecated.html#zero-length-and-one-element-arrays
>  [1]
> Closes: https://github.com/KSPP/linux/issues/333
> Signed-off-by: Erick Archer <erick.archer@outlook.com>
> Link:
> https://lore.kernel.org/r/AS8PR02MB723760CB93942370E92F00638BF72@AS8PR02MB7237.eurprd02.prod.outlook.com
> [kees: tweaked commit log and dropped struct_size() uses]
> Signed-off-by: Kees Cook <kees@kernel.org>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> ---
>  v2: - update based on feedback
>  rfc:
> https://lore.kernel.org/lkml/AS8PR02MB723760CB93942370E92F00638BF72@AS8PR02MB7237.eurprd02.prod.outlook.com/
> ---
>  drivers/hid/intel-ish-hid/ishtp-hid-client.c | 25 ++++++++++--------
> --
>  drivers/hid/intel-ish-hid/ishtp-hid.h        | 11 +++++----
>  2 files changed, 19 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/hid/intel-ish-hid/ishtp-hid-client.c
> b/drivers/hid/intel-ish-hid/ishtp-hid-client.c
> index fbd4f8ea1951..cb04cd1d980b 100644
> --- a/drivers/hid/intel-ish-hid/ishtp-hid-client.c
> +++ b/drivers/hid/intel-ish-hid/ishtp-hid-client.c
> @@ -70,10 +70,10 @@ static void process_recv(struct ishtp_cl
> *hid_ishtp_cl, void *recv_buf,
>         unsigned char *payload;
>         struct device_info *dev_info;
>         int i, j;
> -       size_t  payload_len, total_len, cur_pos, raw_len;
> +       size_t  payload_len, total_len, cur_pos, raw_len, msg_len;
>         int report_type;
>         struct report_list *reports_list;
> -       char *reports;
> +       struct report *report;
>         size_t report_len;
>         struct ishtp_cl_data *client_data =
> ishtp_get_client_data(hid_ishtp_cl);
>         int curr_hid_dev = client_data->cur_hid_dev;
> @@ -280,14 +280,13 @@ static void process_recv(struct ishtp_cl
> *hid_ishtp_cl, void *recv_buf,
>                 case HOSTIF_PUBLISH_INPUT_REPORT_LIST:
>                         report_type = HID_INPUT_REPORT;
>                         reports_list = (struct report_list *)payload;
> -                       reports = (char *)reports_list->reports;
> +                       report = reports_list->reports;
>  
>                         for (j = 0; j < reports_list->num_of_reports;
> j++) {
> -                               recv_msg = (struct hostif_msg
> *)(reports +
> -                                       sizeof(uint16_t));
> -                               report_len = *(uint16_t *)reports;
> -                               payload = reports + sizeof(uint16_t)
> +
> -                                       sizeof(struct
> hostif_msg_hdr);
> +                               recv_msg = container_of(&report->msg,
> +                                                       struct
> hostif_msg, hdr);
> +                               report_len = report->size;
> +                               payload = recv_msg->payload;
>                                 payload_len = report_len -
>                                         sizeof(struct
> hostif_msg_hdr);
>  
> @@ -304,7 +303,7 @@ static void process_recv(struct ishtp_cl
> *hid_ishtp_cl, void *recv_buf,
>                                                 0);
>                                         }
>  
> -                               reports += sizeof(uint16_t) +
> report_len;
> +                               report += sizeof(*report) +
> payload_len;
>                         }
>                         break;
>                 default:
> @@ -316,12 +315,12 @@ static void process_recv(struct ishtp_cl
> *hid_ishtp_cl, void *recv_buf,
>  
>                 }
>  
> -               if (!cur_pos && cur_pos + payload_len +
> -                               sizeof(struct hostif_msg) <
> total_len)
> +               msg_len = payload_len + sizeof(struct hostif_msg);
> +               if (!cur_pos && cur_pos + msg_len < total_len)
>                         ++client_data->multi_packet_cnt;
>  
> -               cur_pos += payload_len + sizeof(struct hostif_msg);
> -               payload += payload_len + sizeof(struct hostif_msg);
> +               cur_pos += msg_len;
> +               payload += msg_len;
>  
>         } while (cur_pos < total_len);
>  }
> diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.h
> b/drivers/hid/intel-ish-hid/ishtp-hid.h
> index 35dddc5015b3..2bc19e8ba13e 100644
> --- a/drivers/hid/intel-ish-hid/ishtp-hid.h
> +++ b/drivers/hid/intel-ish-hid/ishtp-hid.h
> @@ -31,6 +31,7 @@ struct hostif_msg_hdr {
>  
>  struct hostif_msg {
>         struct hostif_msg_hdr   hdr;
> +       uint8_t payload[];
>  } __packed;
>  
>  struct hostif_msg_to_sensor {
> @@ -52,15 +53,17 @@ struct ishtp_version {
>         uint16_t build;
>  } __packed;
>  
> +struct report {
> +       uint16_t size;
> +       struct hostif_msg_hdr msg;
> +} __packed;
> +
>  /* struct for ISHTP aggregated input data */
>  struct report_list {
>         uint16_t total_size;
>         uint8_t num_of_reports;
>         uint8_t flags;
> -       struct {
> -               uint16_t        size_of_report;
> -               uint8_t report[1];
> -       } __packed reports[1];
> +       struct report reports[];
>  } __packed;
>  
>  /* HOSTIF commands */


^ permalink raw reply

* Re: [PATCH] HID: i2c-hid-of: Drop explicit initialization of struct i2c_device_id::driver_data to 0
From: Doug Anderson @ 2024-09-23 16:05 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Jiri Kosina, Benjamin Tissoires, Johan Hovold, linux-input
In-Reply-To: <20240920153430.503212-10-u.kleine-koenig@baylibre.com>

Hi,

On Fri, Sep 20, 2024 at 8:35 AM Uwe Kleine-König
<u.kleine-koenig@baylibre.com> wrote:
>
> These drivers don't use the driver_data member of struct i2c_device_id,
> so don't explicitly initialize this member.
>
> This prepares putting driver_data in an anonymous union which requires
> either no initialization or named designators. But it's also a nice
> cleanup on its own.
>
> While touching the initializer, also remove the comma after the sentinel
> entry.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
>  drivers/hid/i2c-hid/i2c-hid-of.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

^ permalink raw reply

* Re: [PATCH v6 2/2] dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format
From: Macpaul Lin @ 2024-09-23 10:43 UTC (permalink / raw)
  To: Alexandre Belloni, AngeloGioacchino Del Regno
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	Liam Girdwood, Mark Brown, Sean Wang, Sen Chu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek, Dmitry Torokhov,
	Pavel Machek, Lee Jones, Sebastian Reichel, Chen Zhong,
	linux-input, linux-leds, linux-pm, linux-rtc, linux-sound,
	Alexandre Mergnat, Bear Wang, Pablo Sun, Macpaul Lin,
	Chris-qj chen, MediaTek Chromebook Upstream, Chen-Yu Tsai
In-Reply-To: <202409201337500284902d@mail.local>


On 9/20/24 21:37, Alexandre Belloni wrote:

[snip]

>> > > > >  - RTC:
>> > > > >   - Drop "start-year"
>> > > > 

[snip]

>> > 
>> 
>> Alexandre, I definitely agree with you on the fact that the MTK PMIC RTC driver
>> can (and needs to) be improved, and that it can make use of some nice cleanup...
>> 
>> ... but!
>> 
>> This series performs a conversion to schema, and the previous txt file didn't
>> say anything about the start-year property - which was not mandatory to support
>> at that time (nor now, afaik?), so adding support for that is out of scope for
>> this series.
> 
> It is mandatory now. I agree this can be done in a subsequent series.
> 

Thanks you all for helping with the review and kindly understanding the
situation. I see that Angelo has already submitted the RTC patch set.
I'll check it with the internal driver owner. It seems okay with a quick 
glance.

>> 
>> Eventually, that can come as a series on top, adding support for that in the
>> binding (and, of course, in the driver).
>> 
>> I should be able to tackle that... most probably next week - but still, the
>> improvements would come as a series on top of this one.
>> 
>> Cheers,
>> Angelo
> 

Thanks
Macpaul Lin

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox