* Re: [BUG: 6.3 kernel] Logitech Trackball M575 misidentified
From: Bastien Nocera @ 2023-05-31 8:50 UTC (permalink / raw)
To: Linux regressions mailing list, Xose Vazquez Perez, linux-input
Cc: Filipe Laíns, Jiri Kosina, Benjamin Tissoires, LKML
In-Reply-To: <8941c5f2-3861-da68-06ca-adc68a37e53b@leemhuis.info>
On Tue, 2023-05-16 at 14:33 +0200, Linux regression tracking (Thorsten
Leemhuis) wrote:
> [CCing a few people and the the regression list, as it should be in
> the
> loop for regressions:
> https://docs.kernel.org/admin-guide/reporting-regressions.html]
>
> On 11.05.23 23:22, Xose Vazquez Perez wrote:
> >
> > 6.3.2 kernel identifies "Logitech" "ERGO M575" as "Logitech"
> > "(\xc9_O\x04)",
> > 6.2.15 works fine.
> >
> >
> > 6.2.15 boot log:
> > input: Logitech ERGO M575 as
> > /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-
> > 1.3:1.2/0003:046D:C52B.0003/0003:046D:4096.0005/input/input15
> > logitech-hidpp-device 0003:046D:4096.0005: input,hidraw1: USB HID
> > v1.11
> > Mouse [Logitech ERGO M575] on usb-0000:00:1a.0-1.3/input2:1
> >
> > 6.3.2 boot log:
> > input: Logitech \xc9_O\x04 as
> > /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-
> > 1.3:1.2/0003:046D:C52B.0003/0003:046D:4096.0005/input/input15
> > logitech-hidpp-device 0003:046D:4096.0005: input,hidraw2: USB HID
> > v1.11
> > Mouse [Logitech \xc9_O\x04] on usb-0000:00:1a.0-1.3/input2:1
>
> I wonder if this if this is some related to this issue:
> https://bugzilla.kernel.org/show_bug.cgi?id=217412
> ("Since kernel 6.3.1 logitech unify receiver not working properly")
>
> That one so far seems to be ignored by the developers. Your report
> one
> also didn't get any reply yet.
>
> Could you maybe perform a bisection to get down to this?
>
> Side note: there is also
> https://bugzilla.kernel.org/show_bug.cgi?id=217330
> ("Broken Logitech unifying battery names in hid-next tree")
The device name problem is tracked in 217330, which I filed.
A bisection would definitely help me if you have time, otherwise I'll
get to it, but it's probably not going to be before a couple of weeks.
You can also test this patch on top of the latest kernel tree:
https://patchwork.kernel.org/project/linux-input/patch/20230531082428.21763-1-hadess@hadess.net/
although I don't expect it to make a difference.
Cheers
>
>
> Anyway, for the rest of this mail:
>
> [TLDR: I'm adding this report to the list of tracked Linux kernel
> regressions; the text you find below is based on a few templates
> paragraphs you might have encountered already in similar form.
> See link in footer if these mails annoy you.]
>
> Thanks for the report. To be sure the issue doesn't fall through the
> cracks unnoticed, I'm adding it to regzbot, the Linux kernel
> regression
> tracking bot:
>
> #regzbot ^introduced v6.2..v6.3
> #regzbot title input: Logitech Trackball M575 misidentified
> #regzbot ignore-activity
>
> This isn't a regression? This issue or a fix for it are already
> discussed somewhere else? It was fixed already? You want to clarify
> when
> the regression started to happen? Or point out I got the title or
> something else totally wrong? Then just reply and tell me -- ideally
> while also telling regzbot about it, as explained by the page listed
> in
> the footer of this mail.
>
> Developers: When fixing the issue, remember to add 'Link:' tags
> pointing
> to the report (the parent of this mail). See page linked in footer
> for
> details.
>
> Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker'
> hat)
> --
> Everything you wanna know about Linux kernel regression tracking:
> https://linux-regtracking.leemhuis.info/about/#tldr
> That page also explains what to do if mails like this annoy you.
^ permalink raw reply
* [PATCH] Input: elan_i2c - Implement inhibit/uninhibit functions.
From: jingle.wu @ 2023-05-31 9:03 UTC (permalink / raw)
To: linux-kernel, linux-input, dmitry.torokhov
Cc: phoenix, josh.chen, dave.wang, jingle.wu
Add inhibit/uninhibit functions.
Signed-off-by: Jingle.wu <jingle.wu@emc.com.tw>
---
drivers/input/mouse/elan_i2c_core.c | 207 ++++++++++++++++++++++++++++
1 file changed, 207 insertions(+)
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
index 5f0d75a45c80..4ea57f4c7bd4 100644
--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -56,6 +56,7 @@ struct elan_tp_data {
struct input_dev *input;
struct input_dev *tp_input; /* trackpoint input node */
struct regulator *vcc;
+ struct list_head list; /* for list of devices needing input handler */
const struct elan_transport_ops *ops;
@@ -63,6 +64,11 @@ struct elan_tp_data {
struct completion fw_completion;
bool in_fw_update;
+ struct work_struct lid_work;
+ bool lid_switch;
+ int lid_value;
+ bool in_inhibit;
+
struct mutex sysfs_mutex;
unsigned int max_x;
@@ -96,6 +102,9 @@ struct elan_tp_data {
u32 quirks; /* Various quirks */
};
+static struct workqueue_struct *elan_mode_wq;
+static LIST_HEAD(elan_devices_with_lid_handler);
+
static u32 elan_i2c_lookup_quirks(u16 ic_type, u16 product_id)
{
static const struct {
@@ -329,6 +338,74 @@ static int elan_initialize(struct elan_tp_data *data, bool skip_reset)
return error;
}
+static int elan_reactivate(struct elan_tp_data *data)
+{
+ struct device *dev = &data->client->dev;
+ int error;
+
+ error = elan_set_power(data, true);
+ if (error)
+ dev_err(dev, "failed to restore power: %d\n", error);
+
+ error = data->ops->sleep_control(data->client, false);
+ if (error) {
+ dev_err(dev,
+ "failed to wake device up: %d\n", error);
+ return error;
+ }
+
+ return error;
+}
+
+static int elan_inhibit(struct input_dev *input_dev)
+{
+ struct elan_tp_data *data = input_get_drvdata(input_dev);
+ struct i2c_client *client = data->client;
+ int error;
+
+ dev_dbg(&client->dev, "inhibiting\n");
+ /*
+ * We are taking the mutex to make sure sysfs operations are
+ * complete before we attempt to bring the device into low[er]
+ * power mode.
+ */
+ error = mutex_lock_interruptible(&data->sysfs_mutex);
+ if (error)
+ return error;
+
+ disable_irq(client->irq);
+
+ error = elan_set_power(data, false);
+ if (error)
+ enable_irq(client->irq);
+
+ data->in_inhibit = true;
+ mutex_unlock(&data->sysfs_mutex);
+
+ return error;
+}
+
+static int elan_uninhibit(struct input_dev *input_dev)
+{
+ struct elan_tp_data *data = input_get_drvdata(input_dev);
+ struct i2c_client *client = data->client;
+ int error;
+
+ dev_dbg(&client->dev, "uninhibiting\n");
+ error = mutex_lock_interruptible(&data->sysfs_mutex);
+ if (error)
+ return error;
+
+ error = elan_reactivate(data);
+ if (error == 0)
+ enable_irq(client->irq);
+
+ data->in_inhibit = false;
+ mutex_unlock(&data->sysfs_mutex);
+
+ return error;
+}
+
static int elan_query_device_info(struct elan_tp_data *data)
{
int error;
@@ -1187,6 +1264,124 @@ static void elan_disable_regulator(void *_data)
regulator_disable(data->vcc);
}
+static void lid_work_handler(struct work_struct *work)
+{
+ struct elan_tp_data *data = container_of(work, struct elan_tp_data,
+ lid_work);
+
+ if (data->lid_value)
+ elan_inhibit(data->input);
+ else
+ elan_uninhibit(data->input);
+
+}
+
+static void elan_input_lid_event(struct input_handle *handle, unsigned int type,
+ unsigned int code, int value)
+{
+ struct elan_tp_data *data, *n;
+
+ if (type == EV_SW && code == SW_LID) {
+ list_for_each_entry_safe(data, n, &elan_devices_with_lid_handler, list) {
+ data->lid_value = value;
+ queue_work(elan_mode_wq, &data->lid_work);
+ }
+ }
+
+}
+
+struct elan_input_lid {
+ struct input_handle handle;
+};
+
+static int elan_input_lid_connect(struct input_handler *handler,
+ struct input_dev *dev,
+ const struct input_device_id *id)
+{
+ struct elan_input_lid *lid;
+ char *name;
+ int error;
+
+ lid = kzalloc(sizeof(*lid), GFP_KERNEL);
+ if (!lid)
+ return -ENOMEM;
+ name = kasprintf(GFP_KERNEL, "elan-i2c-lid-%s", dev_name(&dev->dev));
+ if (!name) {
+ error = -ENOMEM;
+ goto err_free_lid;
+ }
+ lid->handle.dev = dev;
+ lid->handle.handler = handler;
+ lid->handle.name = name;
+ lid->handle.private = lid;
+ error = input_register_handle(&lid->handle);
+ if (error)
+ goto err_free_name;
+ error = input_open_device(&lid->handle);
+ if (error)
+ goto err_unregister_handle;
+ return 0;
+err_unregister_handle:
+ input_unregister_handle(&lid->handle);
+err_free_name:
+ kfree(name);
+err_free_lid:
+ kfree(lid);
+ return error;
+}
+
+static void elan_input_lid_disconnect(struct input_handle *handle)
+{
+ struct elan_input_lid *lid = handle->private;
+
+ input_close_device(handle);
+ input_unregister_handle(handle);
+ kfree(handle->name);
+ kfree(lid);
+}
+
+static const struct input_device_id elan_input_lid_ids[] = {
+ {
+ .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_SWBIT,
+ .evbit = { BIT_MASK(EV_SW) },
+ .swbit = { [BIT_WORD(SW_LID)] = BIT_MASK(SW_LID) },
+ },
+ { },
+};
+
+static struct input_handler elan_input_lid_handler = {
+ .event = elan_input_lid_event,
+ .connect = elan_input_lid_connect,
+ .disconnect = elan_input_lid_disconnect,
+ .name = "elan-i2c-lid",
+ .id_table = elan_input_lid_ids,
+};
+
+static int elan_create_lid_handler(struct elan_tp_data *data)
+{
+ int error = 0;
+
+ elan_mode_wq = create_singlethread_workqueue("elan-i2c-lid");
+ if (elan_mode_wq == NULL)
+ return -ENOMEM;
+ error = input_register_handler(&elan_input_lid_handler);
+ if (error)
+ goto remove_wq;
+
+ data->lid_switch = true;
+ INIT_LIST_HEAD(&data->list);
+ INIT_WORK(&data->lid_work, lid_work_handler);
+ list_add_tail(&data->list, &elan_devices_with_lid_handler);
+
+ return 0;
+
+remove_wq:
+ data->lid_switch = false;
+ destroy_workqueue(elan_mode_wq);
+ elan_mode_wq = NULL;
+ return error;
+}
+
static int elan_probe(struct i2c_client *client)
{
const struct elan_transport_ops *transport_ops;
@@ -1325,6 +1520,10 @@ static int elan_probe(struct i2c_client *client)
}
}
+ error = elan_create_lid_handler(data);
+ if (error)
+ dev_err(dev, "failed to create lid handler: %d\n", error);
+
return 0;
}
@@ -1334,6 +1533,10 @@ static int elan_suspend(struct device *dev)
struct elan_tp_data *data = i2c_get_clientdata(client);
int ret;
+ /* Wait for switch on completion */
+ if (data->lid_switch)
+ flush_workqueue(elan_mode_wq);
+
/*
* We are taking the mutex to make sure sysfs operations are
* complete before we attempt to bring the device into low[er]
@@ -1371,6 +1574,10 @@ static int elan_resume(struct device *dev)
struct elan_tp_data *data = i2c_get_clientdata(client);
int error;
+ /* Wait for switch on completion */
+ if (data->lid_switch)
+ flush_workqueue(elan_mode_wq);
+
if (!device_may_wakeup(dev)) {
error = regulator_enable(data->vcc);
if (error) {
--
2.34.1
^ permalink raw reply related
* [PATCH] HID: input: Support devices sending Eraser without Invert
From: Illia Ostapyshyn @ 2023-05-31 13:03 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires
Cc: Illia Ostapyshyn, linux-input, linux-kernel, Nils Fuhler
Some digitizers (notably XP-Pen Artist 24) do not report the Invert
usage when erasing. This causes the device to be permanently stuck with
the BTN_TOOL_RUBBER tool after sending Eraser, as Invert is the only
usage that can release the tool. In this state, Touch and Inrange are
no longer reported to userspace, rendering the pen unusable.
Prior to commit 87562fcd1342 ("HID: input: remove the need for
HID_QUIRK_INVERT"), BTN_TOOL_RUBBER was never set and Eraser events were
simply translated into BTN_TOUCH without causing an inconsistent state.
Introduce HID_QUIRK_NOINVERT for such digitizers and detect them during
hidinput_configure_usage(). This quirk causes the tool to be released
as soon as Eraser is reported as not set. Set BTN_TOOL_RUBBER in
input->keybit when mapping Eraser.
Fixes: 87562fcd1342 ("HID: input: remove the need for HID_QUIRK_INVERT")
Co-developed-by: Nils Fuhler <nils@nilsfuhler.de>
Signed-off-by: Nils Fuhler <nils@nilsfuhler.de>
Signed-off-by: Illia Ostapyshyn <ostapyshyn@sra.uni-hannover.de>
---
We were wondering about the reason to keep quirk bits reserved for
backward compatibility. Is it because of dynamic quirks at module load
time? In that case, it could be reasonable to revive bit 0 for this
purpose as it was overwritten in hidinput_hid_event() anyway.
---
drivers/hid/hid-input.c | 18 ++++++++++++++++--
include/linux/hid.h | 1 +
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index a1d2690a1a0d..c443f78287df 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -988,6 +988,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
return;
case 0x3c: /* Invert */
+ device->quirks &= ~HID_QUIRK_NOINVERT;
map_key_clear(BTN_TOOL_RUBBER);
break;
@@ -1013,9 +1014,13 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
case 0x45: /* ERASER */
/*
* This event is reported when eraser tip touches the surface.
- * Actual eraser (BTN_TOOL_RUBBER) is set by Invert usage when
- * tool gets in proximity.
+ * Actual eraser (BTN_TOOL_RUBBER) is set and released either
+ * by Invert if tool reports proximity or by Eraser directly.
*/
+ if (!test_bit(BTN_TOOL_RUBBER, input->keybit)) {
+ device->quirks |= HID_QUIRK_NOINVERT;
+ set_bit(BTN_TOOL_RUBBER, input->keybit);
+ }
map_key_clear(BTN_TOUCH);
break;
@@ -1579,6 +1584,15 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
else if (report->tool != BTN_TOOL_RUBBER)
/* value is off, tool is not rubber, ignore */
return;
+ else if (*quirks & HID_QUIRK_NOINVERT &&
+ !test_bit(BTN_TOUCH, input->key)) {
+ /*
+ * There is no invert to release the tool, let hid_input
+ * send BTN_TOUCH with scancode and release the tool after.
+ */
+ hid_report_release_tool(report, input, BTN_TOOL_RUBBER);
+ return;
+ }
/* let hid-input set BTN_TOUCH */
break;
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 4e4c4fe36911..7cbc10073a1f 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -360,6 +360,7 @@ struct hid_item {
#define HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP BIT(18)
#define HID_QUIRK_HAVE_SPECIAL_DRIVER BIT(19)
#define HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE BIT(20)
+#define HID_QUIRK_NOINVERT BIT(21)
#define HID_QUIRK_FULLSPEED_INTERVAL BIT(28)
#define HID_QUIRK_NO_INIT_REPORTS BIT(29)
#define HID_QUIRK_NO_IGNORE BIT(30)
--
2.30.2
^ permalink raw reply related
* Re: [PATCH] HID: logitech-hidpp: Handle timeout differently from busy
From: Jiri Kosina @ 2023-05-31 14:07 UTC (permalink / raw)
To: Bastien Nocera
Cc: linux-input, linux-kernel, Benjamin Tissoires,
Peter F . Patel-Schneider, Filipe Laíns, Nestor Lopez Casado,
Mark Lord
In-Reply-To: <20230531082428.21763-1-hadess@hadess.net>
On Wed, 31 May 2023, Bastien Nocera wrote:
> If an attempt at contacting a receiver or a device fails because the
> receiver or device never responds, don't restart the communication, only
> restart it if the receiver or device answers that it's busy, as originally
> intended.
>
> This was the behaviour on communication timeout before commit 586e8fede795
> ("HID: logitech-hidpp: Retry commands when device is busy").
>
> This fixes some overly long waits in a critical path on boot, when
> checking whether the device is connected by getting its HID++ version.
>
> Signed-off-by: Bastien Nocera <hadess@hadess.net>
> Suggested-by: Mark Lord <mlord@pobox.com>
> Fixes: 586e8fede795 ("HID: logitech-hidpp: Retry commands when device is busy")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217412
> ---
> drivers/hid/hid-logitech-hidpp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
> index 0fcfd85fea0f..2246044b1639 100644
> --- a/drivers/hid/hid-logitech-hidpp.c
> +++ b/drivers/hid/hid-logitech-hidpp.c
> @@ -314,6 +314,7 @@ static int hidpp_send_message_sync(struct hidpp_device *hidpp,
> dbg_hid("%s:timeout waiting for response\n", __func__);
> memset(response, 0, sizeof(struct hidpp_report));
> ret = -ETIMEDOUT;
> + goto exit;
> }
>
I have applied this even before getting confirmation from the reporters in
bugzilla, as it's the right thing to do anyway.
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply
* Re: [PATCH] input: Add new keyboard backlight control keys to match modern notebooks
From: Hans de Goede @ 2023-05-31 13:52 UTC (permalink / raw)
To: Werner Sembach, Dmitry Torokhov, Bastien Nocera; +Cc: linux-input, linux-kernel
In-Reply-To: <20230530110550.18289-1-wse@tuxedocomputers.com>
Hi Werner,
Thank you for your patch.
On 5/30/23 13:05, Werner Sembach wrote:
> The old three KEY_KBDILLUM* keycodes don't reflect the current situation
> modern notebooks anymore. Especially the ones with RGB keyboards.
>
> e.g.
> - Clevo NL50NU has a toggle, an up, a down and a color-cycle key
> - TongFang PH4ARX1 doesn't have a toggle key, but one that cycles through
> off, half-brightness, and full-brightness.
>
> Also, on some devices these keys are already implemented in firmware. It
> would still be nice if there is a way to let userspace know when one of
> these keys is pressed to display the OSD, but don't advice it to actually
> do anything. This is the intended purpose of the KEY_KBDILLUMCHANGE define.
>
> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> ---
> include/uapi/linux/input-event-codes.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index 022a520e31fc2..05287bf9a77f7 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -803,6 +803,10 @@
> #define BTN_TRIGGER_HAPPY39 0x2e6
> #define BTN_TRIGGER_HAPPY40 0x2e7
>
> +#define KEY_KBDILLUMCYCLE 0x2e8
I do not really see what the difference is between this and the existing KEY_KBDILLUMTOGGLE, userspace can already choice whether it toggles to a number of states or just toggles on/off.
So IMHO this one should be dropped.
> +#define KEY_KBDILLUMCOLORCYCLE 0x2e9
This one is fine.
> +#define KEY_KBDILLUMCHANGE 0x2ea
Keyboard backlight support should be exported to userspace as a LED class device, see e.g. :
drivers/platform/x86/thinkpad_acpi.c : tpacpi_led_kbdlight
drivers/platform/x86/dell/dell-laptop.c : kbd_led
And the LED class device sysfs API already has a mechanism for signalling kbd-brightness changes triggered by the hw itself (e.g. by the embedded controller) to userspace. See the use of the
LED_BRIGHT_HW_CHANGED flag and the calling of led_classdev_notify_brightness_hw_changed() in the 2 above drivers.
So strong NACK for adding KEY_KBDILLUMCHANGE, this is duplicate with the led_classdev_notify_brightness_hw_changed() functionality which is already supported by userspace. E.g. GNOME will show an OSD notification similar to the sound volume change OSD when changing the keyboard brightness through EC handled hotkeys on ThinkPads and various Dell models.
TL;DR: to me only KEY_KBDILLUMCOLORCYCLE makes sense, assuming that this needs to be handled by userspace, if this is handled in the EC then this too should simply call led_classdev_notify_brightness_hw_changed()
Regards,
Hans
> +
> /* We avoid low common keys in module aliases so they don't get huge. */
> #define KEY_MIN_INTERESTING KEY_MUTE
> #define KEY_MAX 0x2ff
^ permalink raw reply
* Re: [PATCH 2/2] Input: iqs7222 - add support for Azoteq IQS7222D
From: kernel test robot @ 2023-05-31 16:45 UTC (permalink / raw)
To: Jeff LaBundy, dmitry.torokhov, robh+dt
Cc: oe-kbuild-all, linux-input, devicetree, jeff
In-Reply-To: <ZHaoFCIpUM6ocPKO@nixie71>
Hi Jeff,
kernel test robot noticed the following build warnings:
[auto build test WARNING on dtor-input/next]
[also build test WARNING on dtor-input/for-linus robh/for-next hid/for-next linus/master v6.4-rc4 next-20230531]
[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/Jeff-LaBundy/Input-iqs7222-add-support-for-Azoteq-IQS7222D/20230531-095226
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
patch link: https://lore.kernel.org/r/ZHaoFCIpUM6ocPKO%40nixie71
patch subject: [PATCH 2/2] Input: iqs7222 - add support for Azoteq IQS7222D
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20230601/202306010012.Dmk3yaas-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/b8b40762779cc4c0208ff51ef9fbb2d8015ba164
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jeff-LaBundy/Input-iqs7222-add-support-for-Azoteq-IQS7222D/20230531-095226
git checkout b8b40762779cc4c0208ff51ef9fbb2d8015ba164
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 olddefconfig
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/input/misc/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306010012.Dmk3yaas-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/input/misc/iqs7222.c: In function 'iqs7222_parse_tpad':
>> drivers/input/misc/iqs7222.c:2574:36: warning: unused variable 'val' [-Wunused-variable]
2574 | unsigned int chan_sel[12], val;
| ^~~
vim +/val +2574 drivers/input/misc/iqs7222.c
2563
2564 static int iqs7222_parse_tpad(struct iqs7222_private *iqs7222,
2565 struct fwnode_handle *tpad_node, int tpad_index)
2566 {
2567 const struct iqs7222_dev_desc *dev_desc = iqs7222->dev_desc;
2568 struct touchscreen_properties *prop = &iqs7222->prop;
2569 struct i2c_client *client = iqs7222->client;
2570 int num_chan = dev_desc->reg_grps[IQS7222_REG_GRP_CHAN].num_row;
2571 int count, error, i;
2572 u16 *event_mask = &iqs7222->sys_setup[dev_desc->event_offset];
2573 u16 *tpad_setup = iqs7222->tpad_setup;
> 2574 unsigned int chan_sel[12], val;
2575
2576 error = iqs7222_parse_props(iqs7222, tpad_node, tpad_index,
2577 IQS7222_REG_GRP_TPAD,
2578 IQS7222_REG_KEY_NONE);
2579 if (error)
2580 return error;
2581
2582 count = fwnode_property_count_u32(tpad_node, "azoteq,channel-select");
2583 if (count < 0) {
2584 dev_err(&client->dev, "Failed to count %s channels: %d\n",
2585 fwnode_get_name(tpad_node), count);
2586 return count;
2587 } else if (!count || count > ARRAY_SIZE(chan_sel)) {
2588 dev_err(&client->dev, "Invalid number of %s channels\n",
2589 fwnode_get_name(tpad_node));
2590 return -EINVAL;
2591 }
2592
2593 error = fwnode_property_read_u32_array(tpad_node,
2594 "azoteq,channel-select",
2595 chan_sel, count);
2596 if (error) {
2597 dev_err(&client->dev, "Failed to read %s channels: %d\n",
2598 fwnode_get_name(tpad_node), error);
2599 return error;
2600 }
2601
2602 tpad_setup[6] &= ~GENMASK(num_chan - 1, 0);
2603
2604 for (i = 0; i < ARRAY_SIZE(chan_sel); i++) {
2605 tpad_setup[8 + i] = 0;
2606 if (i >= count || chan_sel[i] == U8_MAX)
2607 continue;
2608
2609 if (chan_sel[i] >= num_chan) {
2610 dev_err(&client->dev, "Invalid %s channel: %u\n",
2611 fwnode_get_name(tpad_node), chan_sel[i]);
2612 return -EINVAL;
2613 }
2614
2615 /*
2616 * The following fields indicate which channels participate in
2617 * the trackpad, as well as each channel's relative placement.
2618 */
2619 tpad_setup[6] |= BIT(chan_sel[i]);
2620 tpad_setup[8 + i] = chan_sel[i] * 34 + 1072;
2621 }
2622
2623 tpad_setup[7] = dev_desc->touch_link;
2624 if (fwnode_property_present(tpad_node, "azoteq,use-prox"))
2625 tpad_setup[7] -= 2;
2626
2627 for (i = 0; i < ARRAY_SIZE(iqs7222_tp_events); i++)
2628 tpad_setup[20] &= ~(iqs7222_tp_events[i].strict |
2629 iqs7222_tp_events[i].enable);
2630
2631 for (i = 0; i < ARRAY_SIZE(iqs7222_tp_events); i++) {
2632 const char *event_name = iqs7222_tp_events[i].name;
2633 struct fwnode_handle *event_node;
2634
2635 event_node = fwnode_get_named_child_node(tpad_node, event_name);
2636 if (!event_node)
2637 continue;
2638
2639 if (fwnode_property_present(event_node,
2640 "azoteq,gesture-angle-tighten"))
2641 tpad_setup[20] |= iqs7222_tp_events[i].strict;
2642
2643 tpad_setup[20] |= iqs7222_tp_events[i].enable;
2644
2645 error = iqs7222_parse_event(iqs7222, event_node, tpad_index,
2646 IQS7222_REG_GRP_TPAD,
2647 iqs7222_tp_events[i].reg_key,
2648 iqs7222_tp_events[i].link, 1566,
2649 NULL,
2650 &iqs7222->tp_code[i]);
2651 fwnode_handle_put(event_node);
2652 if (error)
2653 return error;
2654
2655 if (!dev_desc->event_offset)
2656 continue;
2657
2658 /*
2659 * The press/release event is determined based on whether the
2660 * coordinate fields report 0xFFFF and solely relies on touch
2661 * or proximity interrupts to be unmasked.
2662 */
2663 if (i)
2664 *event_mask |= IQS7222_EVENT_MASK_TPAD;
2665 else if (tpad_setup[7] == dev_desc->touch_link)
2666 *event_mask |= IQS7222_EVENT_MASK_TOUCH;
2667 else
2668 *event_mask |= IQS7222_EVENT_MASK_PROX;
2669 }
2670
2671 if (!iqs7222->tp_code[0])
2672 return 0;
2673
2674 input_set_abs_params(iqs7222->keypad, ABS_X,
2675 0, (tpad_setup[4] ? : 1) - 1, 0, 0);
2676
2677 input_set_abs_params(iqs7222->keypad, ABS_Y,
2678 0, (tpad_setup[5] ? : 1) - 1, 0, 0);
2679
2680 touchscreen_parse_properties(iqs7222->keypad, false, prop);
2681
2682 if (prop->max_x >= U16_MAX || prop->max_y >= U16_MAX) {
2683 dev_err(&client->dev, "Invalid trackpad size: %u*%u\n",
2684 prop->max_x, prop->max_y);
2685 return -EINVAL;
2686 }
2687
2688 tpad_setup[4] = prop->max_x + 1;
2689 tpad_setup[5] = prop->max_y + 1;
2690
2691 return 0;
2692 }
2693
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [PATCH 1/2] dt-bindings: input: iqs7222: Add properties for Azoteq IQS7222D
From: Krzysztof Kozlowski @ 2023-05-31 17:22 UTC (permalink / raw)
To: Jeff LaBundy, dmitry.torokhov, robh+dt; +Cc: linux-input, devicetree
In-Reply-To: <ZHanv+8fOYhpyMEC@nixie71>
On 31/05/2023 03:49, Jeff LaBundy wrote:
> Extend the common binding to include a new variant of the silicon.
>
> Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.
It's not the first time - you keep ignoring maintainers output all the time.
> ---
> .../bindings/input/azoteq,iqs7222.yaml | 202 +++++++++++++++++-
> 1 file changed, 192 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
> index 9ddba7f2e7aa..a4c251a430fa 100644
> --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
> +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
> @@ -4,14 +4,14 @@
> $id: http://devicetree.org/schemas/input/azoteq,iqs7222.yaml#
> $schema: http://devicetree.org/meta-schemas/core.yaml#
>
> -title: Azoteq IQS7222A/B/C Capacitive Touch Controller
> +title: Azoteq IQS7222A/B/C/D Capacitive Touch Controller
>
> maintainers:
> - Jeff LaBundy <jeff@labundy.com>
>
> description: |
> - The Azoteq IQS7222A, IQS7222B and IQS7222C are multichannel capacitive touch
> - controllers that feature additional sensing capabilities.
> + The Azoteq IQS7222A, IQS7222B, IQS7222C and IQS7222D are multichannel capac-
> + itive touch controllers that feature additional sensing capabilities.
Don't split words.
>
> Link to datasheets: https://www.azoteq.com/
>
> @@ -21,6 +21,7 @@ properties:
> - azoteq,iqs7222a
> - azoteq,iqs7222b
> - azoteq,iqs7222c
> + - azoteq,iqs7222d
>
> reg:
> maxItems: 1
> @@ -173,6 +174,148 @@ properties:
> maximum: 3000
> description: Specifies the report rate (in ms) during ultra-low-power mode.
>
> + touchscreen-size-x: true
> + touchscreen-size-y: true
> + touchscreen-inverted-x: true
> + touchscreen-inverted-y: true
> + touchscreen-swapped-x-y: true
Why? Aren't they coming from common schema?
> +
> + trackpad:
> + type: object
> + description: Represents all channels associated with the trackpad.
> +
> + properties:
> + azoteq,channel-select:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 1
> + maxItems: 12
> + items:
> + minimum: 0
> + maximum: 13
> + description:
> + Specifies the order of the channels that participate in the trackpad.
> + Specify 255 to omit a given channel for the purpose of mapping a non-
> + rectangular trackpad.
> +
> + azoteq,num-rows:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 1
> + maximum: 12
> + description: Specifies the number of rows that comprise the trackpad.
> +
> + azoteq,num-cols:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 1
> + maximum: 12
> + description: Specifies the number of columns that comprise the trackpad.
> +
> + azoteq,top-speed:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + multipleOf: 4
> + minimum: 0
> + maximum: 1020
> + description:
> + Specifies the speed of movement after which coordinate filtering is
> + no longer applied.
Units?
> +
> + azoteq,bottom-speed:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 0
> + maximum: 255
> + description:
> + Specifies the speed of movement after which coordinate filtering is
> + linearly reduced.
Units?
> +
> + azoteq,use-prox:
> + type: boolean
> + description:
> + Directs the trackpad to respond to the proximity states of the se-
> + lected channels instead of their corresponding touch states. Note
Don't split the words.
> + the trackpad cannot report granular coordinates during a state of
> + proximity.
> +
> + patternProperties:
> + "^azoteq,lower-cal-(x|y)$":
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 0
> + maximum: 255
> + description: Specifies the trackpad's lower starting points.
Why would you need this property? Why does this represent hardware property?
> +
> + "^azoteq,upper-cal-(x|y)$":
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 0
> + maximum: 255
> + description: Specifies the trackpad's upper starting points.
> +
> + "^event-(press|tap|(swipe|flick)-(x|y)-(pos|neg))$":
> + type: object
> + $ref: input.yaml#
> + description:
> + Represents a press or gesture event reported by the trackpad. Specify
> + 'linux,code' under the press event to report absolute coordinates.
> +
> + properties:
> + linux,code: true
> +
> + azoteq,gesture-angle-tighten:
> + type: boolean
> + description:
> + Limits the tangent of the gesture angle to 0.5 (axial gestures
> + only). If specified in one direction, the effect is applied in
> + either direction.
> +
> + azoteq,gesture-max-ms:
> + multipleOf: 16
> + minimum: 0
> + maximum: 4080
> + description:
> + Specifies the length of time (in ms) within which a tap, swipe
> + or flick gesture must be completed in order to be acknowledged
> + by the device. The number specified for any one swipe or flick
> + gesture applies to all other swipe or flick gestures.
> +
> + azoteq,gesture-min-ms:
> + multipleOf: 16
> + minimum: 0
> + maximum: 4080
> + description:
> + Specifies the length of time (in ms) for which a tap gesture must
> + be held in order to be acknowledged by the device.
> +
> + azoteq,gesture-dist:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 0
> + maximum: 65535
> + description:
> + Specifies the distance across which a tap, swipe or flick gesture
> + must travel in order to be acknowledged by the device. The number
> + specified for any one swipe or flick gesture applies to all other
> + swipe or flick gestures.
> +
> + azoteq,gpio-select:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 1
> + maxItems: 3
> + items:
> + minimum: 0
> + maximum: 2
> + description: |
> + Specifies one or more GPIO mapped to the event as follows:
> + 0: GPIO0
> + 1: GPIO3
> + 2: GPIO4
> +
> + Note that although multiple events can be mapped to a single
> + GPIO, they must all be of the same type (proximity, touch or
> + trackpad gesture).
> +
> + additionalProperties: false
> +
> + required:
> + - azoteq,channel-select
> +
> + additionalProperties: false
> +
> patternProperties:
> "^cycle-[0-9]$":
> type: object
> @@ -288,6 +431,10 @@ patternProperties:
> Activates the reference channel in response to proximity events
> instead of touch events.
>
> + azoteq,counts-filt-enable:
> + type: boolean
> + description: Applies counts filtering to the channel.
> +
> azoteq,ati-band:
> $ref: /schemas/types.yaml#/definitions/uint32
> enum: [0, 1, 2, 3]
> @@ -432,12 +579,12 @@ patternProperties:
> description: |
> Specifies one or more GPIO mapped to the event as follows:
> 0: GPIO0
> - 1: GPIO3 (IQS7222C only)
> - 2: GPIO4 (IQS7222C only)
> + 1: GPIO3
> + 2: GPIO4
Why changing this? Is it valid for IQS7222A?
>
> Note that although multiple events can be mapped to a single
> GPIO, they must all be of the same type (proximity, touch or
> - slider gesture).
> + slider/trackpad gesture).
>
> azoteq,thresh:
> $ref: /schemas/types.yaml#/definitions/uint32
> @@ -610,8 +757,8 @@ patternProperties:
> description: |
> Specifies one or more GPIO mapped to the event as follows:
> 0: GPIO0
> - 1: GPIO3 (IQS7222C only)
> - 2: GPIO4 (IQS7222C only)
> + 1: GPIO3
> + 2: GPIO4
>
> Note that although multiple events can be mapped to a single
> GPIO, they must all be of the same type (proximity, touch or
> @@ -629,8 +776,8 @@ patternProperties:
> description: |
> Represents a GPIO mapped to one or more events as follows:
> gpio-0: GPIO0
> - gpio-1: GPIO3 (IQS7222C only)
> - gpio-2: GPIO4 (IQS7222C only)
> + gpio-1: GPIO3
> + gpio-2: GPIO4
>
> allOf:
> - $ref: ../pinctrl/pincfg-node.yaml#
> @@ -641,6 +788,41 @@ patternProperties:
> additionalProperties: false
>
> allOf:
> + - $ref: touchscreen/touchscreen.yaml#
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: azoteq,iqs7222d
> +
> + then:
> + patternProperties:
> + "^cycle-[0-9]$":
> + properties:
> + azoteq,iref-enable: false
> +
> + "^channel-([0-9]|1[0-9])$":
> + properties:
> + azoteq,ref-select: false
> +
> + "^slider-[0-1]$": false
> +
> + else:
> + properties:
> + touchscreen-size-x: false
> + touchscreen-size-y: false
> + touchscreen-inverted-x: false
> + touchscreen-inverted-y: false
> + touchscreen-swapped-x-y: false
> +
> + trackpad: false
The binding got quite complicated. Are you sure these are similar devices?
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH 1/2] dt-bindings: input: iqs7222: Add properties for Azoteq IQS7222D
From: Jeff LaBundy @ 2023-06-01 1:23 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: dmitry.torokhov, robh+dt, linux-input, devicetree,
krzysztof.kozlowski+dt, conor+dt
In-Reply-To: <e3b35a40-daf2-c06a-1de4-1d2fdd1c68c8@kernel.org>
Hi Krzysztof,
On Wed, May 31, 2023 at 07:22:31PM +0200, Krzysztof Kozlowski wrote:
> On 31/05/2023 03:49, Jeff LaBundy wrote:
> > Extend the common binding to include a new variant of the silicon.
> >
> > Signed-off-by: Jeff LaBundy <jeff@labundy.com>
>
> Please use scripts/get_maintainers.pl to get a list of necessary people
> and lists to CC. It might happen, that command when run on an older
> kernel, gives you outdated entries. Therefore please be sure you base
> your patches on recent Linux kernel.
>
> It's not the first time - you keep ignoring maintainers output all the time.
You'll have to forgive me; I'm submitting using some homemade tooling that
is not yet stitched to get_maintainers, and I neglected to see that we're
fortunate to have two more great maintainers. I'll fix that going forward.
>
> > ---
> > .../bindings/input/azoteq,iqs7222.yaml | 202 +++++++++++++++++-
> > 1 file changed, 192 insertions(+), 10 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
> > index 9ddba7f2e7aa..a4c251a430fa 100644
> > --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
> > +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
> > @@ -4,14 +4,14 @@
> > $id: http://devicetree.org/schemas/input/azoteq,iqs7222.yaml#
> > $schema: http://devicetree.org/meta-schemas/core.yaml#
> >
> > -title: Azoteq IQS7222A/B/C Capacitive Touch Controller
> > +title: Azoteq IQS7222A/B/C/D Capacitive Touch Controller
> >
> > maintainers:
> > - Jeff LaBundy <jeff@labundy.com>
> >
> > description: |
> > - The Azoteq IQS7222A, IQS7222B and IQS7222C are multichannel capacitive touch
> > - controllers that feature additional sensing capabilities.
> > + The Azoteq IQS7222A, IQS7222B, IQS7222C and IQS7222D are multichannel capac-
> > + itive touch controllers that feature additional sensing capabilities.
>
> Don't split words.
ACK.
>
> >
> > Link to datasheets: https://www.azoteq.com/
> >
> > @@ -21,6 +21,7 @@ properties:
> > - azoteq,iqs7222a
> > - azoteq,iqs7222b
> > - azoteq,iqs7222c
> > + - azoteq,iqs7222d
> >
> > reg:
> > maxItems: 1
> > @@ -173,6 +174,148 @@ properties:
> > maximum: 3000
> > description: Specifies the report rate (in ms) during ultra-low-power mode.
> >
> > + touchscreen-size-x: true
> > + touchscreen-size-y: true
> > + touchscreen-inverted-x: true
> > + touchscreen-inverted-y: true
> > + touchscreen-swapped-x-y: true
>
> Why? Aren't they coming from common schema?
Yes, but because additionalProperties is set to false here, we must explicitly
include the subset of properties from the common schema that are allowed for
this particular instance. I counted over a dozen other bindings doing the same.
In case I have misunderstood, please let me know.
>
> > +
> > + trackpad:
> > + type: object
> > + description: Represents all channels associated with the trackpad.
> > +
> > + properties:
> > + azoteq,channel-select:
> > + $ref: /schemas/types.yaml#/definitions/uint32-array
> > + minItems: 1
> > + maxItems: 12
> > + items:
> > + minimum: 0
> > + maximum: 13
> > + description:
> > + Specifies the order of the channels that participate in the trackpad.
> > + Specify 255 to omit a given channel for the purpose of mapping a non-
> > + rectangular trackpad.
> > +
> > + azoteq,num-rows:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + minimum: 1
> > + maximum: 12
> > + description: Specifies the number of rows that comprise the trackpad.
> > +
> > + azoteq,num-cols:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + minimum: 1
> > + maximum: 12
> > + description: Specifies the number of columns that comprise the trackpad.
> > +
> > + azoteq,top-speed:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + multipleOf: 4
> > + minimum: 0
> > + maximum: 1020
> > + description:
> > + Specifies the speed of movement after which coordinate filtering is
> > + no longer applied.
>
> Units?
This is a ratiometric, i.e. unitless value that represents a hardware filter
coefficient. It already exists in this binding prior to this patch under the
slider-0/1 node and is simply re-used here.
>
> > +
> > + azoteq,bottom-speed:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + minimum: 0
> > + maximum: 255
> > + description:
> > + Specifies the speed of movement after which coordinate filtering is
> > + linearly reduced.
>
> Units?
Same here.
>
> > +
> > + azoteq,use-prox:
> > + type: boolean
> > + description:
> > + Directs the trackpad to respond to the proximity states of the se-
> > + lected channels instead of their corresponding touch states. Note
>
> Don't split the words.
ACK.
>
> > + the trackpad cannot report granular coordinates during a state of
> > + proximity.
> > +
> > + patternProperties:
> > + "^azoteq,lower-cal-(x|y)$":
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + minimum: 0
> > + maximum: 255
> > + description: Specifies the trackpad's lower starting points.
>
> Why would you need this property? Why does this represent hardware property?
This property and its cousin below define the physical boundaries of the
touch surface. They are typically used to mask areas that cannot elicit
an electrical response due to manufacturing tolerances or the presence of
an overlay. For that reason, they descend directly from properties of the
hardware.
Similar properties already exist in this binding for the slider case; this
device simply extends the functionality to a second dimenstion.
>
> > +
> > + "^azoteq,upper-cal-(x|y)$":
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + minimum: 0
> > + maximum: 255
> > + description: Specifies the trackpad's upper starting points.
> > +
> > + "^event-(press|tap|(swipe|flick)-(x|y)-(pos|neg))$":
> > + type: object
> > + $ref: input.yaml#
> > + description:
> > + Represents a press or gesture event reported by the trackpad. Specify
> > + 'linux,code' under the press event to report absolute coordinates.
> > +
> > + properties:
> > + linux,code: true
> > +
> > + azoteq,gesture-angle-tighten:
> > + type: boolean
> > + description:
> > + Limits the tangent of the gesture angle to 0.5 (axial gestures
> > + only). If specified in one direction, the effect is applied in
> > + either direction.
> > +
> > + azoteq,gesture-max-ms:
> > + multipleOf: 16
> > + minimum: 0
> > + maximum: 4080
> > + description:
> > + Specifies the length of time (in ms) within which a tap, swipe
> > + or flick gesture must be completed in order to be acknowledged
> > + by the device. The number specified for any one swipe or flick
> > + gesture applies to all other swipe or flick gestures.
> > +
> > + azoteq,gesture-min-ms:
> > + multipleOf: 16
> > + minimum: 0
> > + maximum: 4080
> > + description:
> > + Specifies the length of time (in ms) for which a tap gesture must
> > + be held in order to be acknowledged by the device.
> > +
> > + azoteq,gesture-dist:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + minimum: 0
> > + maximum: 65535
> > + description:
> > + Specifies the distance across which a tap, swipe or flick gesture
> > + must travel in order to be acknowledged by the device. The number
> > + specified for any one swipe or flick gesture applies to all other
> > + swipe or flick gestures.
> > +
> > + azoteq,gpio-select:
> > + $ref: /schemas/types.yaml#/definitions/uint32-array
> > + minItems: 1
> > + maxItems: 3
> > + items:
> > + minimum: 0
> > + maximum: 2
> > + description: |
> > + Specifies one or more GPIO mapped to the event as follows:
> > + 0: GPIO0
> > + 1: GPIO3
> > + 2: GPIO4
> > +
> > + Note that although multiple events can be mapped to a single
> > + GPIO, they must all be of the same type (proximity, touch or
> > + trackpad gesture).
> > +
> > + additionalProperties: false
> > +
> > + required:
> > + - azoteq,channel-select
> > +
> > + additionalProperties: false
> > +
> > patternProperties:
> > "^cycle-[0-9]$":
> > type: object
> > @@ -288,6 +431,10 @@ patternProperties:
> > Activates the reference channel in response to proximity events
> > instead of touch events.
> >
> > + azoteq,counts-filt-enable:
> > + type: boolean
> > + description: Applies counts filtering to the channel.
> > +
> > azoteq,ati-band:
> > $ref: /schemas/types.yaml#/definitions/uint32
> > enum: [0, 1, 2, 3]
> > @@ -432,12 +579,12 @@ patternProperties:
> > description: |
> > Specifies one or more GPIO mapped to the event as follows:
> > 0: GPIO0
> > - 1: GPIO3 (IQS7222C only)
> > - 2: GPIO4 (IQS7222C only)
> > + 1: GPIO3
> > + 2: GPIO4
>
> Why changing this? Is it valid for IQS7222A?
It's not, only for 'C' and now 'D'. However, the restriction for 'A' is already
conveyed in an if/then schema in the original binding. So rather than updating
this text to say "(IQS7222C and IQS7222D only)", I opted to drop the open-coded
text and rely on the existing schema.
> >
> > Note that although multiple events can be mapped to a single
> > GPIO, they must all be of the same type (proximity, touch or
> > - slider gesture).
> > + slider/trackpad gesture).
> >
> > azoteq,thresh:
> > $ref: /schemas/types.yaml#/definitions/uint32
> > @@ -610,8 +757,8 @@ patternProperties:
> > description: |
> > Specifies one or more GPIO mapped to the event as follows:
> > 0: GPIO0
> > - 1: GPIO3 (IQS7222C only)
> > - 2: GPIO4 (IQS7222C only)
> > + 1: GPIO3
> > + 2: GPIO4
> >
> > Note that although multiple events can be mapped to a single
> > GPIO, they must all be of the same type (proximity, touch or
> > @@ -629,8 +776,8 @@ patternProperties:
> > description: |
> > Represents a GPIO mapped to one or more events as follows:
> > gpio-0: GPIO0
> > - gpio-1: GPIO3 (IQS7222C only)
> > - gpio-2: GPIO4 (IQS7222C only)
> > + gpio-1: GPIO3
> > + gpio-2: GPIO4
> >
> > allOf:
> > - $ref: ../pinctrl/pincfg-node.yaml#
> > @@ -641,6 +788,41 @@ patternProperties:
> > additionalProperties: false
> >
> > allOf:
> > + - $ref: touchscreen/touchscreen.yaml#
> > +
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: azoteq,iqs7222d
> > +
> > + then:
> > + patternProperties:
> > + "^cycle-[0-9]$":
> > + properties:
> > + azoteq,iref-enable: false
> > +
> > + "^channel-([0-9]|1[0-9])$":
> > + properties:
> > + azoteq,ref-select: false
> > +
> > + "^slider-[0-1]$": false
> > +
> > + else:
> > + properties:
> > + touchscreen-size-x: false
> > + touchscreen-size-y: false
> > + touchscreen-inverted-x: false
> > + touchscreen-inverted-y: false
> > + touchscreen-swapped-x-y: false
> > +
> > + trackpad: false
>
> The binding got quite complicated. Are you sure these are similar devices?
Yes, I'm quite sure. The silicon is largely the same, the primary difference
being the way two access are reported (2x 1-D vs. 1x 2-D).
The binding hasn't necessarily grown functionally; rather, most properties
from the slider-0/1 node are simply re-used or extended to two dimensions
for the new trackpad node.
My long-term goal is to defer most of these properties to a common vendor
schema as per my note to Rob in [1], but it does not seem possible yet. If
I'm mistaken, or there is a more efficient means of re-use under the current
tooling, I'll happily follow suit.
[1] https://patchwork.kernel.org/patch/13259035/
>
> Best regards,
> Krzysztof
>
Kind regards,
Jeff LaBundy
^ permalink raw reply
* [PATCH v1 00/43] ep93xx device tree conversion
From: Nikita Shubin @ 2023-06-01 5:33 UTC (permalink / raw)
To: Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Alexander Gordeev, Alexandre Belloni, Andy Shevchenko,
Bartosz Golaszewski, Christophe Kerello, Conor Dooley,
Dmitry Torokhov, Emil Renner Berthing, Florian Fainelli,
Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa, Jean Delvare,
Joel Stanley, Jonathan Cameron, Jonathan Neuschäfer,
Krzysztof Kozlowski, Le Moal, Liang Yang, Mark Brown,
Masahiro Yamada, Miquel Raynal, Nathan Chancellor, Neil Armstrong,
Nick Desaulniers, Nicolas Ferre, Nicolas Saenz Julienne,
Nikita Shubin, Richard Weinberger, Russell King (Oracle),
Sergey Shtylyov, Uwe Kleine-König, Vasily Gorbik,
Walker Chen, Yinbo Zhu
Cc: Michael Peters, Kris Bahnsen, alsa-devel, devicetree, dmaengine,
linux-arm-kernel, linux-clk, linux-gpio, linux-ide, linux-input,
linux-kernel, linux-mtd, linux-pm, linux-pwm, linux-rtc,
linux-spi, linux-watchdog, netdev
This series aims to convert ep93xx from platform to full device tree support.
Alexander, Kris - there are some significant changes in clk and pinctrl so can i ask you to tests all once again.
So i am not applying:
Tested-by: Michael Peters <mpeters@embeddedTS.com>
Reviewed-by: Kris Bahnsen <kris@embeddedTS.com>
Tags yet.
Major changes from v0 to v1:
- I totally forgot to include dts bindings for USB, they are working, including in this version
- retinkered ep93xx keypad, the stange thing about it that it always used zeroed
platform data from the very beginning - my first impulse was to remove it entirely, espesially
it's ep9307+ variant, which Alexander and me doesn't have
- major YAML bindings overhaul according to Krzysztof comments
- nand helper converted to LEGACY nand controller
- cleanup clk
- cleanup pinctrl
Sorry if i missed something, first time handling such a big (at least for me) chunk of patches.
Next version should be much faster spin.
Alexandre Belloni:
st,m48t86 is totally trivial, but it has 2 regs instead of one, so dt_binding_check doesn't allow it in trivial.yaml,
regs should be increased to "maxItems: 2"
Miquel Raynal:
Currently made it LEGACY as a more easier way for now, as this series will merge - it will be much
easier to cleanup the rest one by one, i hope it's ok.
Stephen Boyd:
Majory of issues fixed, but:
- removing dma from init section requires converting it from half dt/platform monstrosity
into fully dt compatible
- i would like to have ep93xx_clk_data and ep93xx_map global for now - they can be removed
once dma subsys_initcall removed
Andrew Lunn:
I've tinkered with the preferred way, however this involves turning on
- CONFIG_PHYLIB
- CONFIG_MDIO_DEVICE
And maybe CONFIG_MICREL_PHY (at least for me, unless i can use some
common phy driver) which implies a kernel size increase - which is
undesirable for us.
Can we slip by getting phyid directly from device tree in ep93xx_eth ?
Link: https://lore.kernel.org/all/20230424123522.18302-1-nikita.shubin@maquefel.me/
Cc: kris@embeddedTS.com
Alexander Sverdlin (3):
ARM: dts: ep93xx: Add I2S and AC97 nodes
ARM: dts: ep93xx: Add EDB9302 DT
ASoC: cirrus: edb93xx: Delete driver
Nikita Shubin (40):
gpio: ep93xx: split device in multiple
dt-bindings: soc: Add Cirrus EP93xx
soc: Add SoC driver for Cirrus ep93xx
dt-bindings: clock: Add Cirrus EP93xx
clk: ep93xx: add DT support for Cirrus EP93xx
dt-bindings: pinctrl: Add Cirrus EP93xx
pinctrl: add a Cirrus ep93xx SoC pin controller
dt-bindings: timers: Add Cirrus EP93xx
clocksource: ep93xx: Add driver for Cirrus Logic EP93xx
dt-bindings: rtc: Add Cirrus EP93xx
rtc: ep93xx: add DT support for Cirrus EP93xx
dt-bindings: watchdog: Add Cirrus EP93x
watchdog: ep93xx: add DT support for Cirrus EP93xx
power: reset: Add a driver for the ep93xx reset
dt-bindings: pwm: Add Cirrus EP93xx
pwm: ep93xx: add DT support for Cirrus EP93xx
dt-bindings: spi: Add Cirrus EP93xx
spi: ep93xx: add DT support for Cirrus EP93xx
dt-bindings: net: Add Cirrus EP93xx
net: cirrus: add DT support for Cirrus EP93xx
dt-bindings: dma: Add Cirrus EP93xx
dma: cirrus: add DT support for Cirrus EP93xx
dt-bindings: mtd: Add ts7250 nand-controller
mtd: nand: add support for ts72xx
dt-bindings: ata: Add Cirrus EP93xx
pata: cirrus: add DT support for Cirrus EP93xx
dt-bindings: input: Add Cirrus EP93xx keypad
input: keypad: ep93xx: add DT support for Cirrus EP93xx
dt-bindings: rtc: Add ST M48T86
rtc: m48t86: add DT support for m48t86
dt-bindings: wdt: Add ts72xx
wdt: ts72xx: add DT support for ts72xx
dt-bindings: gpio: Add Cirrus EP93xx
gpio: ep93xx: add DT support for gpio-ep93xx
ARM: dts: add device tree for ep93xx Soc
ARM: ep93xx: DT for the Cirrus ep93xx SoC platforms
pwm: ep93xx: drop legacy pinctrl
pata: cirrus: drop legacy pinctrl
ARM: ep93xx: delete all boardfiles
ARM: ep93xx: soc: drop defines
.../devicetree/bindings/arm/ep93xx.yaml | 107 ++
.../bindings/ata/cirrus,ep9312-pata.yaml | 44 +
.../bindings/clock/cirrus,ep9301.yaml | 64 +
.../bindings/dma/cirrus,ep9301-dma-m2m.yaml | 72 +
.../bindings/dma/cirrus,ep9301-dma-m2p.yaml | 124 ++
.../devicetree/bindings/gpio/gpio-ep9301.yaml | 154 ++
.../bindings/input/cirrus,ep9307-keypad.yaml | 86 +
.../bindings/mtd/technologic,nand.yaml | 47 +
.../bindings/net/cirrus,ep9301-eth.yaml | 61 +
.../pinctrl/cirrus,ep9301-pinctrl.yaml | 66 +
.../bindings/pwm/cirrus,ep9301-pwm.yaml | 48 +
.../bindings/rtc/cirrus,ep9301-rtc.yaml | 40 +
.../bindings/rtc/st,m48t86-rtc.yaml | 38 +
.../devicetree/bindings/spi/spi-ep9301.yaml | 69 +
.../bindings/timer/cirrus,ep9301-timer.yaml | 49 +
.../bindings/watchdog/cirrus,ep9301-wdt.yaml | 46 +
.../watchdog/technologic,ts7200-wdt.yaml | 46 +
arch/arm/Makefile | 1 -
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/ep93xx-bk3.dts | 119 ++
arch/arm/boot/dts/ep93xx-edb9302.dts | 160 ++
arch/arm/boot/dts/ep93xx-ts7250.dts | 132 ++
arch/arm/boot/dts/ep93xx.dtsi | 477 +++++
arch/arm/mach-ep93xx/Kconfig | 20 +-
arch/arm/mach-ep93xx/Makefile | 11 -
arch/arm/mach-ep93xx/clock.c | 733 --------
arch/arm/mach-ep93xx/core.c | 1017 ----------
arch/arm/mach-ep93xx/dma.c | 114 --
arch/arm/mach-ep93xx/edb93xx.c | 344 ----
arch/arm/mach-ep93xx/ep93xx-regs.h | 38 -
arch/arm/mach-ep93xx/gpio-ep93xx.h | 111 --
arch/arm/mach-ep93xx/hardware.h | 25 -
arch/arm/mach-ep93xx/irqs.h | 76 -
arch/arm/mach-ep93xx/platform.h | 42 -
arch/arm/mach-ep93xx/soc.h | 212 ---
arch/arm/mach-ep93xx/ts72xx.c | 422 -----
arch/arm/mach-ep93xx/ts72xx.h | 94 -
arch/arm/mach-ep93xx/vision_ep9307.c | 311 ---
drivers/ata/pata_ep93xx.c | 33 +-
drivers/clk/Kconfig | 8 +
drivers/clk/Makefile | 1 +
drivers/clk/clk-ep93xx.c | 850 +++++++++
drivers/clocksource/Kconfig | 11 +
drivers/clocksource/Makefile | 1 +
.../clocksource}/timer-ep93xx.c | 141 +-
drivers/dma/ep93xx_dma.c | 136 +-
drivers/gpio/gpio-ep93xx.c | 329 ++--
drivers/input/keyboard/ep93xx_keypad.c | 78 +-
drivers/mtd/nand/raw/Kconfig | 7 +
drivers/mtd/nand/raw/Makefile | 1 +
.../nand/raw/technologic-nand-controller.c | 151 ++
drivers/net/ethernet/cirrus/ep93xx_eth.c | 67 +-
drivers/pinctrl/Kconfig | 7 +
drivers/pinctrl/Makefile | 1 +
drivers/pinctrl/pinctrl-ep93xx.c | 1672 +++++++++++++++++
drivers/power/reset/Kconfig | 10 +
drivers/power/reset/Makefile | 1 +
drivers/power/reset/ep93xx-restart.c | 65 +
drivers/pwm/pwm-ep93xx.c | 26 +-
drivers/rtc/rtc-ep93xx.c | 8 +
drivers/rtc/rtc-m48t86.c | 8 +
drivers/soc/Kconfig | 1 +
drivers/soc/Makefile | 1 +
drivers/soc/cirrus/Kconfig | 11 +
drivers/soc/cirrus/Makefile | 2 +
drivers/soc/cirrus/soc-ep93xx.c | 134 ++
drivers/spi/spi-ep93xx.c | 31 +-
drivers/watchdog/ep93xx_wdt.c | 8 +
drivers/watchdog/ts72xx_wdt.c | 8 +
.../dt-bindings/clock/cirrus,ep93xx-clock.h | 53 +
include/linux/platform_data/dma-ep93xx.h | 3 +
include/linux/platform_data/eth-ep93xx.h | 10 -
include/linux/platform_data/keypad-ep93xx.h | 32 -
include/linux/soc/cirrus/ep93xx.h | 40 +-
sound/soc/cirrus/Kconfig | 9 -
sound/soc/cirrus/Makefile | 4 -
sound/soc/cirrus/edb93xx.c | 117 --
77 files changed, 5575 insertions(+), 4122 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/ep93xx.yaml
create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep9312-pata.yaml
create mode 100644 Documentation/devicetree/bindings/clock/cirrus,ep9301.yaml
create mode 100644 Documentation/devicetree/bindings/dma/cirrus,ep9301-dma-m2m.yaml
create mode 100644 Documentation/devicetree/bindings/dma/cirrus,ep9301-dma-m2p.yaml
create mode 100644 Documentation/devicetree/bindings/gpio/gpio-ep9301.yaml
create mode 100644 Documentation/devicetree/bindings/input/cirrus,ep9307-keypad.yaml
create mode 100644 Documentation/devicetree/bindings/mtd/technologic,nand.yaml
create mode 100644 Documentation/devicetree/bindings/net/cirrus,ep9301-eth.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/cirrus,ep9301-pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/pwm/cirrus,ep9301-pwm.yaml
create mode 100644 Documentation/devicetree/bindings/rtc/cirrus,ep9301-rtc.yaml
create mode 100644 Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml
create mode 100644 Documentation/devicetree/bindings/spi/spi-ep9301.yaml
create mode 100644 Documentation/devicetree/bindings/timer/cirrus,ep9301-timer.yaml
create mode 100644 Documentation/devicetree/bindings/watchdog/cirrus,ep9301-wdt.yaml
create mode 100644 Documentation/devicetree/bindings/watchdog/technologic,ts7200-wdt.yaml
create mode 100644 arch/arm/boot/dts/ep93xx-bk3.dts
create mode 100644 arch/arm/boot/dts/ep93xx-edb9302.dts
create mode 100644 arch/arm/boot/dts/ep93xx-ts7250.dts
create mode 100644 arch/arm/boot/dts/ep93xx.dtsi
delete mode 100644 arch/arm/mach-ep93xx/Makefile
delete mode 100644 arch/arm/mach-ep93xx/clock.c
delete mode 100644 arch/arm/mach-ep93xx/core.c
delete mode 100644 arch/arm/mach-ep93xx/dma.c
delete mode 100644 arch/arm/mach-ep93xx/edb93xx.c
delete mode 100644 arch/arm/mach-ep93xx/ep93xx-regs.h
delete mode 100644 arch/arm/mach-ep93xx/gpio-ep93xx.h
delete mode 100644 arch/arm/mach-ep93xx/hardware.h
delete mode 100644 arch/arm/mach-ep93xx/irqs.h
delete mode 100644 arch/arm/mach-ep93xx/platform.h
delete mode 100644 arch/arm/mach-ep93xx/soc.h
delete mode 100644 arch/arm/mach-ep93xx/ts72xx.c
delete mode 100644 arch/arm/mach-ep93xx/ts72xx.h
delete mode 100644 arch/arm/mach-ep93xx/vision_ep9307.c
create mode 100644 drivers/clk/clk-ep93xx.c
rename {arch/arm/mach-ep93xx => drivers/clocksource}/timer-ep93xx.c (52%)
create mode 100644 drivers/mtd/nand/raw/technologic-nand-controller.c
create mode 100644 drivers/pinctrl/pinctrl-ep93xx.c
create mode 100644 drivers/power/reset/ep93xx-restart.c
create mode 100644 drivers/soc/cirrus/Kconfig
create mode 100644 drivers/soc/cirrus/Makefile
create mode 100644 drivers/soc/cirrus/soc-ep93xx.c
create mode 100644 include/dt-bindings/clock/cirrus,ep93xx-clock.h
delete mode 100644 include/linux/platform_data/eth-ep93xx.h
delete mode 100644 include/linux/platform_data/keypad-ep93xx.h
delete mode 100644 sound/soc/cirrus/edb93xx.c
--
2.37.4
^ permalink raw reply
* [PATCH v1 27/43] dt-bindings: input: Add Cirrus EP93xx keypad
From: Nikita Shubin @ 2023-06-01 5:45 UTC (permalink / raw)
To: Alexander Sverdlin, Arnd Bergmann, Linus Walleij, Dmitry Torokhov,
Rob Herring, Krzysztof Kozlowski
Cc: Nikita Shubin, Michael Peters, Kris Bahnsen, linux-input,
devicetree, linux-kernel
In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me>
Add YAML bindings for ep93xx SoC keypad.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Notes:
v0 -> v1:
- remove almost all but debounce-delay-ms and prescale
- s/ep9301-keypad/ep9307-keypad/ it's actually only for
ep9307, ep9312, ep9315
Krzysztof Kozlowski:
- renamed file
- changed maintainers
- dropped quotes
- dropped clock-names
- use fallback compatible and list all possible compatibles
- fix ident
.../bindings/input/cirrus,ep9307-keypad.yaml | 86 +++++++++++++++++++
1 file changed, 86 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/cirrus,ep9307-keypad.yaml
diff --git a/Documentation/devicetree/bindings/input/cirrus,ep9307-keypad.yaml b/Documentation/devicetree/bindings/input/cirrus,ep9307-keypad.yaml
new file mode 100644
index 000000000000..c7eb10a84a6b
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/cirrus,ep9307-keypad.yaml
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/cirrus,ep9307-keypad.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus ep93xx keypad
+
+maintainers:
+ - Alexander Sverdlin <alexander.sverdlin@gmail.com>
+
+allOf:
+ - $ref: /schemas/input/matrix-keymap.yaml#
+
+description: |
+ The KPP is designed to interface with a keypad matrix with 2-point contact
+ or 3-point contact keys. The KPP is designed to simplify the software task
+ of scanning a keypad matrix. The KPP is capable of detecting, debouncing,
+ and decoding one or multiple keys pressed simultaneously on a keypad.
+
+properties:
+ compatible:
+ oneOf:
+ - const: cirrus,ep9307-keypad
+ - items:
+ - enum:
+ - cirrus,ep9312-keypad
+ - cirrus,ep9315-keypad
+ - const: cirrus,ep9307-keypad
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ cirrus,debounce-delay-ms:
+ description: |
+ Time in microseconds that key must be pressed or
+ released for state change interrupt to trigger.
+
+ cirrus,prescale:
+ description: row/column counter pre-scaler load value
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - linux,keymap
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/cirrus,ep93xx-clock.h>
+ #include <dt-bindings/input/input.h>
+ keypad@800f0000 {
+ compatible = "cirrus,ep9301-keypad";
+ reg = <0x800f0000 0x0c>;
+ interrupt-parent = <&vic0>;
+ interrupts = <29>;
+ clocks = <&syscon EP93XX_CLK_KEYPAD>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&keypad_default_pins>;
+ linux,keymap = <KEY_UP>,
+ <KEY_DOWN>,
+ <KEY_VOLUMEDOWN>,
+ <KEY_HOME>,
+ <KEY_RIGHT>,
+ <KEY_LEFT>,
+ <KEY_ENTER>,
+ <KEY_VOLUMEUP>,
+ <KEY_F6>,
+ <KEY_F8>,
+ <KEY_F9>,
+ <KEY_F10>,
+ <KEY_F1>,
+ <KEY_F2>,
+ <KEY_F3>,
+ <KEY_POWER>;
+ };
--
2.37.4
^ permalink raw reply related
* [PATCH v1 28/43] input: keypad: ep93xx: add DT support for Cirrus EP93xx
From: Nikita Shubin @ 2023-06-01 5:45 UTC (permalink / raw)
To: Alexander Sverdlin, Arnd Bergmann, Linus Walleij, Dmitry Torokhov,
Andy Shevchenko, Nikita Shubin, Jonathan Cameron
Cc: Michael Peters, Kris Bahnsen, linux-input, linux-kernel
In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me>
- get keymap from the device tree
- find register range from the device tree
- get interrupts from device tree
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Notes:
v0 -> v1:
- fixed header
- dropped coma in id table
- take debounce, prescale from dt
- remove ep93xx_keypad_platform_data
- move flags to module params
- drop setting clock rate, it's useless, as was never used,
it seems we are okay with default clk rate used
- move usefull defines from platform file here
- drop platform header
drivers/input/keyboard/ep93xx_keypad.c | 78 +++++++++++++-------------
1 file changed, 40 insertions(+), 38 deletions(-)
diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c
index 55075addcac2..8b0e73f56216 100644
--- a/drivers/input/keyboard/ep93xx_keypad.c
+++ b/drivers/input/keyboard/ep93xx_keypad.c
@@ -20,6 +20,7 @@
#include <linux/bits.h>
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/mod_devicetable.h>
#include <linux/interrupt.h>
#include <linux/clk.h>
#include <linux/io.h>
@@ -27,7 +28,6 @@
#include <linux/input/matrix_keypad.h>
#include <linux/slab.h>
#include <linux/soc/cirrus/ep93xx.h>
-#include <linux/platform_data/keypad-ep93xx.h>
#include <linux/pm_wakeirq.h>
/*
@@ -61,12 +61,18 @@
#define KEY_REG_KEY1_MASK GENMASK(5, 0)
#define KEY_REG_KEY1_SHIFT 0
+#define EP93XX_MATRIX_ROWS (8)
+#define EP93XX_MATRIX_COLS (8)
+
#define EP93XX_MATRIX_SIZE (EP93XX_MATRIX_ROWS * EP93XX_MATRIX_COLS)
struct ep93xx_keypad {
- struct ep93xx_keypad_platform_data *pdata;
struct input_dev *input_dev;
struct clk *clk;
+ unsigned int debounce;
+ unsigned int prescale;
+ unsigned int flags;
+ unsigned int clk_rate;
void __iomem *mmio_base;
@@ -80,6 +86,17 @@ struct ep93xx_keypad {
bool enabled;
};
+/* flags for the ep93xx_keypad driver */
+#define EP93XX_KEYPAD_DISABLE_3_KEY (1<<0) /* disable 3-key reset */
+#define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */
+#define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */
+#define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */
+#define EP93XX_KEYPAD_AUTOREPEAT (1<<4) /* enable key autorepeat */
+
+static int ep93xx_keypad_flags;
+module_param(ep93xx_keypad_flags, int, 0);
+MODULE_PARM_DESC(ep93xx_keypad_flags, "EP93XX keypad flags.");
+
static irqreturn_t ep93xx_keypad_irq_handler(int irq, void *dev_id)
{
struct ep93xx_keypad *keypad = dev_id;
@@ -133,23 +150,20 @@ static irqreturn_t ep93xx_keypad_irq_handler(int irq, void *dev_id)
static void ep93xx_keypad_config(struct ep93xx_keypad *keypad)
{
- struct ep93xx_keypad_platform_data *pdata = keypad->pdata;
unsigned int val = 0;
- clk_set_rate(keypad->clk, pdata->clk_rate);
-
- if (pdata->flags & EP93XX_KEYPAD_DISABLE_3_KEY)
+ if (keypad->flags & EP93XX_KEYPAD_DISABLE_3_KEY)
val |= KEY_INIT_DIS3KY;
- if (pdata->flags & EP93XX_KEYPAD_DIAG_MODE)
+ if (keypad->flags & EP93XX_KEYPAD_DIAG_MODE)
val |= KEY_INIT_DIAG;
- if (pdata->flags & EP93XX_KEYPAD_BACK_DRIVE)
+ if (keypad->flags & EP93XX_KEYPAD_BACK_DRIVE)
val |= KEY_INIT_BACK;
- if (pdata->flags & EP93XX_KEYPAD_TEST_MODE)
+ if (keypad->flags & EP93XX_KEYPAD_TEST_MODE)
val |= KEY_INIT_T2;
- val |= ((pdata->debounce << KEY_INIT_DBNC_SHIFT) & KEY_INIT_DBNC_MASK);
+ val |= ((keypad->debounce << KEY_INIT_DBNC_SHIFT) & KEY_INIT_DBNC_MASK);
- val |= ((pdata->prescale << KEY_INIT_PRSCL_SHIFT) & KEY_INIT_PRSCL_MASK);
+ val |= ((keypad->prescale << KEY_INIT_PRSCL_SHIFT) & KEY_INIT_PRSCL_MASK);
__raw_writel(val, keypad->mmio_base + KEY_INIT);
}
@@ -220,17 +234,10 @@ static int ep93xx_keypad_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(ep93xx_keypad_pm_ops,
ep93xx_keypad_suspend, ep93xx_keypad_resume);
-static void ep93xx_keypad_release_gpio_action(void *_pdev)
-{
- struct platform_device *pdev = _pdev;
-
- ep93xx_keypad_release_gpio(pdev);
-}
-
static int ep93xx_keypad_probe(struct platform_device *pdev)
{
+ struct device_node *np = pdev->dev.of_node;
struct ep93xx_keypad *keypad;
- const struct matrix_keymap_data *keymap_data;
struct input_dev *input_dev;
int err;
@@ -238,14 +245,6 @@ static int ep93xx_keypad_probe(struct platform_device *pdev)
if (!keypad)
return -ENOMEM;
- keypad->pdata = dev_get_platdata(&pdev->dev);
- if (!keypad->pdata)
- return -EINVAL;
-
- keymap_data = keypad->pdata->keymap_data;
- if (!keymap_data)
- return -EINVAL;
-
keypad->irq = platform_get_irq(pdev, 0);
if (keypad->irq < 0)
return keypad->irq;
@@ -254,19 +253,15 @@ static int ep93xx_keypad_probe(struct platform_device *pdev)
if (IS_ERR(keypad->mmio_base))
return PTR_ERR(keypad->mmio_base);
- err = ep93xx_keypad_acquire_gpio(pdev);
- if (err)
- return err;
-
- err = devm_add_action_or_reset(&pdev->dev,
- ep93xx_keypad_release_gpio_action, pdev);
- if (err)
- return err;
-
keypad->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(keypad->clk))
return PTR_ERR(keypad->clk);
+ keypad->flags = ep93xx_keypad_flags;
+
+ of_property_read_u32(np, "cirrus,debounce-delay-ms", &keypad->debounce);
+ of_property_read_u32(np, "cirrus,prescale", &keypad->prescale);
+
input_dev = devm_input_allocate_device(&pdev->dev);
if (!input_dev)
return -ENOMEM;
@@ -278,13 +273,13 @@ static int ep93xx_keypad_probe(struct platform_device *pdev)
input_dev->open = ep93xx_keypad_open;
input_dev->close = ep93xx_keypad_close;
- err = matrix_keypad_build_keymap(keymap_data, NULL,
+ err = matrix_keypad_build_keymap(NULL, NULL,
EP93XX_MATRIX_ROWS, EP93XX_MATRIX_COLS,
keypad->keycodes, input_dev);
if (err)
return err;
- if (keypad->pdata->flags & EP93XX_KEYPAD_AUTOREPEAT)
+ if (keypad->flags & EP93XX_KEYPAD_AUTOREPEAT)
__set_bit(EV_REP, input_dev->evbit);
input_set_drvdata(input_dev, keypad);
@@ -315,10 +310,17 @@ static int ep93xx_keypad_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id ep93xx_keypad_of_ids[] = {
+ { .compatible = "cirrus,ep9307-keypad" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, ep93xx_keypad_of_ids);
+
static struct platform_driver ep93xx_keypad_driver = {
.driver = {
.name = "ep93xx-keypad",
.pm = pm_sleep_ptr(&ep93xx_keypad_pm_ops),
+ .of_match_table = ep93xx_keypad_of_ids,
},
.probe = ep93xx_keypad_probe,
.remove = ep93xx_keypad_remove,
--
2.37.4
^ permalink raw reply related
* Re: [PATCH v1 27/43] dt-bindings: input: Add Cirrus EP93xx keypad
From: Rob Herring @ 2023-06-01 8:24 UTC (permalink / raw)
To: Nikita Shubin
Cc: linux-input, devicetree, Rob Herring, Krzysztof Kozlowski,
linux-kernel, Michael Peters, Linus Walleij, Kris Bahnsen,
Arnd Bergmann, Alexander Sverdlin, Dmitry Torokhov
In-Reply-To: <20230601054549.10843-9-nikita.shubin@maquefel.me>
On Thu, 01 Jun 2023 08:45:32 +0300, Nikita Shubin wrote:
> Add YAML bindings for ep93xx SoC keypad.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
>
> Notes:
> v0 -> v1:
>
> - remove almost all but debounce-delay-ms and prescale
> - s/ep9301-keypad/ep9307-keypad/ it's actually only for
> ep9307, ep9312, ep9315
>
> Krzysztof Kozlowski:
> - renamed file
> - changed maintainers
> - dropped quotes
> - dropped clock-names
> - use fallback compatible and list all possible compatibles
> - fix ident
>
> .../bindings/input/cirrus,ep9307-keypad.yaml | 86 +++++++++++++++++++
> 1 file changed, 86 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/cirrus,ep9307-keypad.yaml
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/input/cirrus,ep9307-keypad.example.dtb: /example-0/keypad@800f0000: failed to match any schema with compatible: ['cirrus,ep9301-keypad']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230601054549.10843-9-nikita.shubin@maquefel.me
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply
* [PATCH v1 6/7] dt-bindings: clock: imx6q: Allow single optional clock and add enet_ref_pad
From: Oleksij Rempel @ 2023-06-01 10:14 UTC (permalink / raw)
To: Abel Vesa, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Herbert Xu, David S. Miller, Dmitry Torokhov, Ulf Hansson
Cc: Oleksij Rempel, kernel, Peng Fan, Fabio Estevam, NXP Linux Team,
Daniel Lezcano, Thomas Gleixner, Michael Trimarchi, Mark Brown,
Dario Binacchi, Anson Huang, Marek Vasut, linux-clk, devicetree,
linux-arm-kernel, linux-kernel, linux-crypto, linux-input,
linux-mmc
In-Reply-To: <20230601101451.357662-1-o.rempel@pengutronix.de>
All clocks for this driver are optional, so this change allows the
'clocks' and 'clock-names' properties to accept a single clock.
Additionally, 'enet_ref_pad' clock is added. This resolves the following
dtbs_check warning:
imx6dl-alti6p.dtb: clock-controller@20c4000: clocks: [[24]] is too short
From schema: Documentation/devicetree/bindings/clock/imx6q-clock.yaml
imx6dl-alti6p.dtb: clock-controller@20c4000: clock-names:0: 'osc' was
expected
From schema: Documentation/devicetree/bindings/clock/imx6q-clock.yaml
imx6dl-alti6p.dtb: clock-controller@20c4000: clock-names:
['enet_ref_pad'] is too short
From schema: Documentation/devicetree/bindings/clock/imx6q-clock.yaml
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
.../devicetree/bindings/clock/imx6q-clock.yaml | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.yaml b/Documentation/devicetree/bindings/clock/imx6q-clock.yaml
index bae4fcb3aacc..ed65d19c2e0e 100644
--- a/Documentation/devicetree/bindings/clock/imx6q-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/imx6q-clock.yaml
@@ -28,20 +28,23 @@ properties:
const: 1
clocks:
+ minItems: 1
items:
- description: 24m osc
- description: 32k osc
- description: ckih1 clock input
- description: anaclk1 clock input
- description: anaclk2 clock input
+ - description: enet_ref_pad
clock-names:
- items:
- - const: osc
- - const: ckil
- - const: ckih1
- - const: anaclk1
- - const: anaclk2
+ enum:
+ - osc
+ - ckil
+ - ckih1
+ - anaclk1
+ - anaclk2
+ - enet_ref_pad
fsl,pmic-stby-poweroff:
$ref: /schemas/types.yaml#/definitions/flag
--
2.39.2
^ permalink raw reply related
* [PATCH v1 4/7] dt-bindings: crypto: fsl-dcp: Add i.MX6SL, i.MX6SLL, and i.MX6ULL support
From: Oleksij Rempel @ 2023-06-01 10:14 UTC (permalink / raw)
To: Abel Vesa, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Herbert Xu, David S. Miller, Dmitry Torokhov, Ulf Hansson
Cc: Oleksij Rempel, kernel, Peng Fan, Fabio Estevam, NXP Linux Team,
Daniel Lezcano, Thomas Gleixner, Michael Trimarchi, Mark Brown,
Dario Binacchi, Anson Huang, Marek Vasut, linux-clk, devicetree,
linux-arm-kernel, linux-kernel, linux-crypto, linux-input,
linux-mmc
In-Reply-To: <20230601101451.357662-1-o.rempel@pengutronix.de>
Add support for i.MX6SL, i.MX6SLL, and i.MX6ULL to the 'fsl-dcp' binding
to address the following dtbs_check warning:
imx6ull-jozacp.dtb: crypto@2280000: compatible:0: 'fsl,imx6ull-dcp' is
not one of ['fsl,imx23-dcp', 'fsl,imx28-dcp']
From schema: Documentation/devicetree/bindings/crypto/fsl-dcp.yaml
imx6ull-jozacp.dtb: crypto@2280000: compatible: ['fsl,imx6ull-dcp',
'fsl,imx28-dcp'] is too long
From schema: Documentation/devicetree/bindings/crypto/fsl-dcp.yaml
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
.../devicetree/bindings/crypto/fsl-dcp.yaml | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/crypto/fsl-dcp.yaml b/Documentation/devicetree/bindings/crypto/fsl-dcp.yaml
index 99be01539fcd..8af393b9f3ca 100644
--- a/Documentation/devicetree/bindings/crypto/fsl-dcp.yaml
+++ b/Documentation/devicetree/bindings/crypto/fsl-dcp.yaml
@@ -11,9 +11,22 @@ maintainers:
properties:
compatible:
- enum:
- - fsl,imx23-dcp
- - fsl,imx28-dcp
+ oneOf:
+ - const: fsl,imx23-dcp
+ - const: fsl,imx28-dcp
+ - const: fsl,imx6sl-dcp
+ - const: fsl,imx6sll-dcp
+ - const: fsl,imx6ull-dcp
+ - items:
+ - enum:
+ - fsl,imx6sl-dcp
+ - fsl,imx6sll-dcp
+ - fsl,imx6ull-dcp
+ - const: fsl,imx28-dcp
+ - items:
+ - enum:
+ - fsl,imx28-dcp
+ - const: fsl,imx23-dcp
reg:
maxItems: 1
--
2.39.2
^ permalink raw reply related
* [PATCH v1 0/7] Add support for various features to i.MX6 bindings
From: Oleksij Rempel @ 2023-06-01 10:14 UTC (permalink / raw)
To: Abel Vesa, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Herbert Xu, David S. Miller, Dmitry Torokhov, Ulf Hansson
Cc: Oleksij Rempel, kernel, Peng Fan, Fabio Estevam, NXP Linux Team,
Daniel Lezcano, Thomas Gleixner, Michael Trimarchi, Mark Brown,
Dario Binacchi, Anson Huang, Marek Vasut, linux-clk, devicetree,
linux-arm-kernel, linux-kernel, linux-crypto, linux-input,
linux-mmc
This patch series is aimed at addressing several dtbs_check warnings by
introducing additional support in the device tree bindings for i.MX6
series SoCs. The warnings surfaced while validating some i.MX6 boards.
The issues were predominantly around unrecognized compatibility strings
and missing properties in the device trees.
Oleksij Rempel (7):
dt-bindings: mmc: fsl-imx-esdhc: Add imx6ul support
dt-bindings: timer: gpt: Add i.MX6UL support
dt-bindings: timer: gpt: Support 3rd clock for i.MX6DL
dt-bindings: crypto: fsl-dcp: Add i.MX6SL, i.MX6SLL, and i.MX6ULL
support
dt-bindings: clock: imx6ul: Support optional enet*_ref_pad clocks
dt-bindings: clock: imx6q: Allow single optional clock and add
enet_ref_pad
dt-bindings: input: touchscreen: edt-ft5x06: Add 'threshold' property
.../bindings/clock/imx6q-clock.yaml | 15 ++++++-----
.../bindings/clock/imx6ul-clock.yaml | 6 +++++
.../devicetree/bindings/crypto/fsl-dcp.yaml | 19 +++++++++++---
.../input/touchscreen/edt-ft5x06.yaml | 6 +++++
.../bindings/mmc/fsl-imx-esdhc.yaml | 2 ++
.../devicetree/bindings/timer/fsl,imxgpt.yaml | 26 ++++++++++++++-----
6 files changed, 59 insertions(+), 15 deletions(-)
--
2.39.2
^ permalink raw reply
* [PATCH v1 1/7] dt-bindings: mmc: fsl-imx-esdhc: Add imx6ul support
From: Oleksij Rempel @ 2023-06-01 10:14 UTC (permalink / raw)
To: Abel Vesa, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Herbert Xu, David S. Miller, Dmitry Torokhov, Ulf Hansson
Cc: Oleksij Rempel, kernel, Peng Fan, Fabio Estevam, NXP Linux Team,
Daniel Lezcano, Thomas Gleixner, Michael Trimarchi, Mark Brown,
Dario Binacchi, Anson Huang, Marek Vasut, linux-clk, devicetree,
linux-arm-kernel, linux-kernel, linux-crypto, linux-input,
linux-mmc
In-Reply-To: <20230601101451.357662-1-o.rempel@pengutronix.de>
Add the 'fsl,imx6ul-usdhc' value to the compatible properties list in
the fsl-imx-esdhc.yaml file. This is required to match the compatible
strings present in the 'mmc@2190000' node of 'imx6ul-prti6g.dtb'. This
commit addresses the following dtbs_check warning:
imx6ul-prti6g.dtb: mmc@2190000: compatible: 'oneOf' conditional failed,
one must be fixed: ['fsl,imx6ul-usdhc', 'fsl,imx6sx-usdhc'] is too long
'fsl,imx6ul-usdhc' is not one of ['fsl,imx25-esdhc', 'fsl,imx35-esdhc',
'fsl,imx51-esdhc', 'fsl,imx53-esdhc', 'fsl,imx6q-usdhc',
'fsl,imx6sl-usdhc', 'fsl,imx6sx-usdhc', 'fsl,imx7d-usdhc',
'fsl,imx7ulp-usdhc', 'fsl,imx8mm-usdhc', 'fsl,imxrt1050-usdhc',
'nxp,s32g2-usdhc']
From schema: Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
index fbfd822b9270..090e781705d3 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
@@ -30,6 +30,7 @@ properties:
- fsl,imx6q-usdhc
- fsl,imx6sl-usdhc
- fsl,imx6sx-usdhc
+ - fsl,imx6ul-usdhc
- fsl,imx7d-usdhc
- fsl,imx7ulp-usdhc
- fsl,imx8mm-usdhc
@@ -42,6 +43,7 @@ properties:
- enum:
- fsl,imx6sll-usdhc
- fsl,imx6ull-usdhc
+ - fsl,imx6ul-usdhc
- const: fsl,imx6sx-usdhc
- items:
- const: fsl,imx7d-usdhc
--
2.39.2
^ permalink raw reply related
* [PATCH v1 3/7] dt-bindings: timer: gpt: Support 3rd clock for i.MX6DL
From: Oleksij Rempel @ 2023-06-01 10:14 UTC (permalink / raw)
To: Abel Vesa, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Herbert Xu, David S. Miller, Dmitry Torokhov, Ulf Hansson
Cc: Oleksij Rempel, kernel, Peng Fan, Fabio Estevam, NXP Linux Team,
Daniel Lezcano, Thomas Gleixner, Michael Trimarchi, Mark Brown,
Dario Binacchi, Anson Huang, Marek Vasut, linux-clk, devicetree,
linux-arm-kernel, linux-kernel, linux-crypto, linux-input,
linux-mmc
In-Reply-To: <20230601101451.357662-1-o.rempel@pengutronix.de>
Add support for a 3rd clock, 'osc_per', for i.MX6DL to the 'fsl,imxgpt'
binding to resolve the following dtbs_check warning:
imx6dl-alti6p.dtb: timer@2098000: clocks: [[2, 119], [2, 120], [2, 237]]
is too long
From schema: Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
imx6dl-alti6p.dtb: timer@2098000: clock-names: ['ipg', 'per', 'osc_per']
is too long
From schema: Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
.../devicetree/bindings/timer/fsl,imxgpt.yaml | 22 ++++++++++++++-----
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
index adf617b8f353..21ff51c3f38f 100644
--- a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
+++ b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
@@ -46,14 +46,24 @@ properties:
maxItems: 1
clocks:
- items:
- - description: SoC GPT ipg clock
- - description: SoC GPT per clock
+ anyOf:
+ - items:
+ - description: SoC GPT ipg clock
+ - description: SoC GPT per clock
+ - items:
+ - description: SoC GPT ipg clock
+ - description: SoC GPT per clock
+ - description: SoC GPT osc_per clock
clock-names:
- items:
- - const: ipg
- - const: per
+ anyOf:
+ - items:
+ - const: ipg
+ - const: per
+ - items:
+ - const: ipg
+ - const: per
+ - const: osc_per
required:
- compatible
--
2.39.2
^ permalink raw reply related
* [PATCH v1 7/7] dt-bindings: input: touchscreen: edt-ft5x06: Add 'threshold' property
From: Oleksij Rempel @ 2023-06-01 10:14 UTC (permalink / raw)
To: Abel Vesa, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Herbert Xu, David S. Miller, Dmitry Torokhov, Ulf Hansson
Cc: Oleksij Rempel, kernel, Peng Fan, Fabio Estevam, NXP Linux Team,
Daniel Lezcano, Thomas Gleixner, Michael Trimarchi, Mark Brown,
Dario Binacchi, Anson Huang, Marek Vasut, linux-clk, devicetree,
linux-arm-kernel, linux-kernel, linux-crypto, linux-input,
linux-mmc
In-Reply-To: <20230601101451.357662-1-o.rempel@pengutronix.de>
Add a new property 'threshold' to the edt-ft5x06 touchscreen binding.
This property allows setting the "click"-threshold in the range from 0
to 255. This change addresses the following dtbs_check warning:
imx6dl-lanmcu.dtb: touchscreen@38: 'threshold' does not match any of the
regexes: 'pinctrl-[0-9]+'
From schema:
Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
.../devicetree/bindings/input/touchscreen/edt-ft5x06.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
index ef4c841387bd..f2808cb4d99d 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
@@ -93,6 +93,12 @@ properties:
minimum: 1
maximum: 255
+ threshold:
+ description: Allows setting the "click"-threshold in the range from 0 to 255.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-fuzz-x: true
--
2.39.2
^ permalink raw reply related
* [PATCH v1 5/7] dt-bindings: clock: imx6ul: Support optional enet*_ref_pad clocks
From: Oleksij Rempel @ 2023-06-01 10:14 UTC (permalink / raw)
To: Abel Vesa, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Herbert Xu, David S. Miller, Dmitry Torokhov, Ulf Hansson
Cc: Oleksij Rempel, kernel, Peng Fan, Fabio Estevam, NXP Linux Team,
Daniel Lezcano, Thomas Gleixner, Michael Trimarchi, Mark Brown,
Dario Binacchi, Anson Huang, Marek Vasut, linux-clk, devicetree,
linux-arm-kernel, linux-kernel, linux-crypto, linux-input,
linux-mmc
In-Reply-To: <20230601101451.357662-1-o.rempel@pengutronix.de>
Extend the 'clocks' and 'clock-names' properties to support optional
'enet1_ref_pad' and 'enet2_ref_pad' clocks to resolve the following
dtbs_check warning:
imx6ul-prti6g.dtb: clock-controller@20c4000: clocks: [[17], [18], [19],
[20], [21]] is too long
From schema: Documentation/devicetree/bindings/clock/imx6ul-clock.yaml
imx6ul-prti6g.dtb: clock-controller@20c4000: clock-names: ['ckil',
'osc', 'ipp_di0', 'ipp_di1', 'enet1_ref_pad'] is too long
From schema: Documentation/devicetree/bindings/clock/imx6ul-clock.yaml
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
Documentation/devicetree/bindings/clock/imx6ul-clock.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/imx6ul-clock.yaml b/Documentation/devicetree/bindings/clock/imx6ul-clock.yaml
index be54d4df5afa..d6a36fe575d3 100644
--- a/Documentation/devicetree/bindings/clock/imx6ul-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/imx6ul-clock.yaml
@@ -28,18 +28,24 @@ properties:
const: 1
clocks:
+ minItems: 4
items:
- description: 32k osc
- description: 24m osc
- description: ipp_di0 clock input
- description: ipp_di1 clock input
+ - description: Optional lenet1_ref_pad or enet2_ref_pad clocks
+ - description: Optional lenet1_ref_pad or enet2_ref_pad clocks
clock-names:
+ minItems: 4
items:
- const: ckil
- const: osc
- const: ipp_di0
- const: ipp_di1
+ - enum: [enet1_ref_pad, enet2_ref_pad]
+ - enum: [enet1_ref_pad, enet2_ref_pad]
required:
- compatible
--
2.39.2
^ permalink raw reply related
* [PATCH v1 2/7] dt-bindings: timer: gpt: Add i.MX6UL support
From: Oleksij Rempel @ 2023-06-01 10:14 UTC (permalink / raw)
To: Abel Vesa, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Herbert Xu, David S. Miller, Dmitry Torokhov, Ulf Hansson
Cc: Oleksij Rempel, kernel, Peng Fan, Fabio Estevam, NXP Linux Team,
Daniel Lezcano, Thomas Gleixner, Michael Trimarchi, Mark Brown,
Dario Binacchi, Anson Huang, Marek Vasut, linux-clk, devicetree,
linux-arm-kernel, linux-kernel, linux-crypto, linux-input,
linux-mmc
In-Reply-To: <20230601101451.357662-1-o.rempel@pengutronix.de>
Add 'fsl,imx6ul-gpt' compatible to resolve the following dtbs_check
warning:
/arch/arm/boot/dts/imx6ull-jozacp.dtb: timer@20e8000: compatible:
'oneOf' conditional failed, one must be fixed:
'fsl,imx6ul-gpt' is not one of ['fsl,imx25-gpt', 'fsl,imx50-gpt',
'fsl,imx51-gpt', 'fsl,imx53-gpt', 'fsl,imx6q-gpt']
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
index 716c6afcca1f..adf617b8f353 100644
--- a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
+++ b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
@@ -34,6 +34,10 @@ properties:
- fsl,imxrt1050-gpt
- fsl,imxrt1170-gpt
- const: fsl,imx6dl-gpt
+ - const: fsl,imx6ul-gpt
+ - items:
+ - const: fsl,imx6ul-gpt
+ - const: fsl,imx6sx-gpt
reg:
maxItems: 1
--
2.39.2
^ permalink raw reply related
* Re: [PATCH v1 28/43] input: keypad: ep93xx: add DT support for Cirrus EP93xx
From: kernel test robot @ 2023-06-01 15:20 UTC (permalink / raw)
To: Nikita Shubin, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Dmitry Torokhov, Andy Shevchenko, Jonathan Cameron
Cc: oe-kbuild-all, Michael Peters, Kris Bahnsen, linux-input,
linux-kernel
In-Reply-To: <20230601054549.10843-10-nikita.shubin@maquefel.me>
Hi Nikita,
kernel test robot noticed the following build errors:
[auto build test ERROR on clk/clk-next]
[also build test ERROR on linusw-pinctrl/devel linusw-pinctrl/for-next linus/master v6.4-rc4 next-20230601]
[cannot apply to soc/for-next robh/for-next]
[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/Nikita-Shubin/dt-bindings-soc-Add-Cirrus-EP93xx/20230601-143415
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link: https://lore.kernel.org/r/20230601054549.10843-10-nikita.shubin%40maquefel.me
patch subject: [PATCH v1 28/43] input: keypad: ep93xx: add DT support for Cirrus EP93xx
config: arm-randconfig-r046-20230531 (https://download.01.org/0day-ci/archive/20230601/202306012336.68kZBdn0-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/79136093fef692a2db3c48c2d30e37310599131f
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Nikita-Shubin/dt-bindings-soc-Add-Cirrus-EP93xx/20230601-143415
git checkout 79136093fef692a2db3c48c2d30e37310599131f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/input/keyboard/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306012336.68kZBdn0-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/input/keyboard/ep93xx_keypad.c: In function 'ep93xx_keypad_probe':
>> drivers/input/keyboard/ep93xx_keypad.c:262:9: error: implicit declaration of function 'of_property_read_u32' [-Werror=implicit-function-declaration]
262 | of_property_read_u32(np, "cirrus,debounce-delay-ms", &keypad->debounce);
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/of_property_read_u32 +262 drivers/input/keyboard/ep93xx_keypad.c
233
234 static DEFINE_SIMPLE_DEV_PM_OPS(ep93xx_keypad_pm_ops,
235 ep93xx_keypad_suspend, ep93xx_keypad_resume);
236
237 static int ep93xx_keypad_probe(struct platform_device *pdev)
238 {
239 struct device_node *np = pdev->dev.of_node;
240 struct ep93xx_keypad *keypad;
241 struct input_dev *input_dev;
242 int err;
243
244 keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad), GFP_KERNEL);
245 if (!keypad)
246 return -ENOMEM;
247
248 keypad->irq = platform_get_irq(pdev, 0);
249 if (keypad->irq < 0)
250 return keypad->irq;
251
252 keypad->mmio_base = devm_platform_ioremap_resource(pdev, 0);
253 if (IS_ERR(keypad->mmio_base))
254 return PTR_ERR(keypad->mmio_base);
255
256 keypad->clk = devm_clk_get(&pdev->dev, NULL);
257 if (IS_ERR(keypad->clk))
258 return PTR_ERR(keypad->clk);
259
260 keypad->flags = ep93xx_keypad_flags;
261
> 262 of_property_read_u32(np, "cirrus,debounce-delay-ms", &keypad->debounce);
263 of_property_read_u32(np, "cirrus,prescale", &keypad->prescale);
264
265 input_dev = devm_input_allocate_device(&pdev->dev);
266 if (!input_dev)
267 return -ENOMEM;
268
269 keypad->input_dev = input_dev;
270
271 input_dev->name = pdev->name;
272 input_dev->id.bustype = BUS_HOST;
273 input_dev->open = ep93xx_keypad_open;
274 input_dev->close = ep93xx_keypad_close;
275
276 err = matrix_keypad_build_keymap(NULL, NULL,
277 EP93XX_MATRIX_ROWS, EP93XX_MATRIX_COLS,
278 keypad->keycodes, input_dev);
279 if (err)
280 return err;
281
282 if (keypad->flags & EP93XX_KEYPAD_AUTOREPEAT)
283 __set_bit(EV_REP, input_dev->evbit);
284 input_set_drvdata(input_dev, keypad);
285
286 err = devm_request_irq(&pdev->dev, keypad->irq,
287 ep93xx_keypad_irq_handler,
288 0, pdev->name, keypad);
289 if (err)
290 return err;
291
292 err = input_register_device(input_dev);
293 if (err)
294 return err;
295
296 platform_set_drvdata(pdev, keypad);
297
298 device_init_wakeup(&pdev->dev, 1);
299 err = dev_pm_set_wake_irq(&pdev->dev, keypad->irq);
300 if (err)
301 dev_warn(&pdev->dev, "failed to set up wakeup irq: %d\n", err);
302
303 return 0;
304 }
305
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [PATCH v1 28/43] input: keypad: ep93xx: add DT support for Cirrus EP93xx
From: kernel test robot @ 2023-06-01 15:31 UTC (permalink / raw)
To: Nikita Shubin, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Dmitry Torokhov, Andy Shevchenko, Jonathan Cameron
Cc: llvm, oe-kbuild-all, Michael Peters, Kris Bahnsen, linux-input,
linux-kernel
In-Reply-To: <20230601054549.10843-10-nikita.shubin@maquefel.me>
Hi Nikita,
kernel test robot noticed the following build errors:
[auto build test ERROR on clk/clk-next]
[also build test ERROR on linusw-pinctrl/devel linusw-pinctrl/for-next linus/master v6.4-rc4 next-20230601]
[cannot apply to soc/for-next robh/for-next]
[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/Nikita-Shubin/dt-bindings-soc-Add-Cirrus-EP93xx/20230601-143415
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link: https://lore.kernel.org/r/20230601054549.10843-10-nikita.shubin%40maquefel.me
patch subject: [PATCH v1 28/43] input: keypad: ep93xx: add DT support for Cirrus EP93xx
config: hexagon-randconfig-r045-20230531 (https://download.01.org/0day-ci/archive/20230601/202306012327.f8AIwhqv-lkp@intel.com/config)
compiler: clang version 15.0.4 (https://github.com/llvm/llvm-project 5c68a1cb123161b54b72ce90e7975d95a8eaf2a4)
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/79136093fef692a2db3c48c2d30e37310599131f
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Nikita-Shubin/dt-bindings-soc-Add-Cirrus-EP93xx/20230601-143415
git checkout 79136093fef692a2db3c48c2d30e37310599131f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=hexagon olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/input/keyboard/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306012327.f8AIwhqv-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/input/keyboard/ep93xx_keypad.c:24:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/input/keyboard/ep93xx_keypad.c:24:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/input/keyboard/ep93xx_keypad.c:24:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
>> drivers/input/keyboard/ep93xx_keypad.c:262:2: error: call to undeclared function 'of_property_read_u32'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
of_property_read_u32(np, "cirrus,debounce-delay-ms", &keypad->debounce);
^
6 warnings and 1 error generated.
vim +/of_property_read_u32 +262 drivers/input/keyboard/ep93xx_keypad.c
233
234 static DEFINE_SIMPLE_DEV_PM_OPS(ep93xx_keypad_pm_ops,
235 ep93xx_keypad_suspend, ep93xx_keypad_resume);
236
237 static int ep93xx_keypad_probe(struct platform_device *pdev)
238 {
239 struct device_node *np = pdev->dev.of_node;
240 struct ep93xx_keypad *keypad;
241 struct input_dev *input_dev;
242 int err;
243
244 keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad), GFP_KERNEL);
245 if (!keypad)
246 return -ENOMEM;
247
248 keypad->irq = platform_get_irq(pdev, 0);
249 if (keypad->irq < 0)
250 return keypad->irq;
251
252 keypad->mmio_base = devm_platform_ioremap_resource(pdev, 0);
253 if (IS_ERR(keypad->mmio_base))
254 return PTR_ERR(keypad->mmio_base);
255
256 keypad->clk = devm_clk_get(&pdev->dev, NULL);
257 if (IS_ERR(keypad->clk))
258 return PTR_ERR(keypad->clk);
259
260 keypad->flags = ep93xx_keypad_flags;
261
> 262 of_property_read_u32(np, "cirrus,debounce-delay-ms", &keypad->debounce);
263 of_property_read_u32(np, "cirrus,prescale", &keypad->prescale);
264
265 input_dev = devm_input_allocate_device(&pdev->dev);
266 if (!input_dev)
267 return -ENOMEM;
268
269 keypad->input_dev = input_dev;
270
271 input_dev->name = pdev->name;
272 input_dev->id.bustype = BUS_HOST;
273 input_dev->open = ep93xx_keypad_open;
274 input_dev->close = ep93xx_keypad_close;
275
276 err = matrix_keypad_build_keymap(NULL, NULL,
277 EP93XX_MATRIX_ROWS, EP93XX_MATRIX_COLS,
278 keypad->keycodes, input_dev);
279 if (err)
280 return err;
281
282 if (keypad->flags & EP93XX_KEYPAD_AUTOREPEAT)
283 __set_bit(EV_REP, input_dev->evbit);
284 input_set_drvdata(input_dev, keypad);
285
286 err = devm_request_irq(&pdev->dev, keypad->irq,
287 ep93xx_keypad_irq_handler,
288 0, pdev->name, keypad);
289 if (err)
290 return err;
291
292 err = input_register_device(input_dev);
293 if (err)
294 return err;
295
296 platform_set_drvdata(pdev, keypad);
297
298 device_init_wakeup(&pdev->dev, 1);
299 err = dev_pm_set_wake_irq(&pdev->dev, keypad->irq);
300 if (err)
301 dev_warn(&pdev->dev, "failed to set up wakeup irq: %d\n", err);
302
303 return 0;
304 }
305
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [v2 2/2] dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip
From: Doug Anderson @ 2023-06-01 15:40 UTC (permalink / raw)
To: cong yang
Cc: Krzysztof Kozlowski, benjamin.tissoires, devicetree,
dmitry.torokhov, hsinyi, jikos, linux-input, linux-kernel, mka,
Rob Herring, Conor Dooley
In-Reply-To: <CAHwB_N+ZpCAYftCLRwyNo2wCca+JHfGJc0_rJ=jwJcU0mbG=Dw@mail.gmail.com>
Hi,
On Wed, May 31, 2023 at 8:06 PM cong yang
<yangcong5@huaqin.corp-partner.google.com> wrote:
>
> Thanks, I'll keep an eye on that next time. This patch can be discarded,.After adding this series https://lore.kernel.org/r/20230523193017.4109557-1-dianders@chromium.org,
Thanks! I'll see if I can give that series a spin soon and then see
how we can make progress to getting it landed.
> using ekth6915 also can meet my needs.
Even if using ekth6915 can meet your needs, it's still better to
actually add the right compatible string. Putting in the device tree
that you have an "elan6915" and that you're providing "vcc33" isn't
the best when you actually have a different touchscreen and are
providing a very different voltage. Adding the proper bindings is
definitely preferred.
> On Wed, May 31, 2023 at 12:58 AM Doug Anderson <dianders@chromium.org> wrote:
>>
>> Hi,
>>
>> On Tue, May 30, 2023 at 4:56 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>> >
>> > On 22/05/2023 17:33, Doug Anderson wrote:
>> > > Hi,
>> > >
>> > > On Fri, May 19, 2023 at 10:07 PM Cong Yang
>> > > <yangcong5@huaqin.corp-partner.google.com> wrote:
>> > >>
>> > >> Add an ilitek touch screen chip ili9882t.
>> > >>
>> > >> Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
>> > >> ---
>> > >> .../devicetree/bindings/input/elan,ekth6915.yaml | 9 +++++++--
>> > >> 1 file changed, 7 insertions(+), 2 deletions(-)
>> > >
>> > > I'm curious about the DT maintainers opinion here. Should this be a
>> > > new bindings file, or should it be together in the elan file. If
>> > > nothing else, I think the secondary voltage rail name is wrong. I took
>> > > a quick peek at a datasheet I found and I don't even see a 3.3V rail
>> > > going to the ili9882t. That makes it weird to reuse "vcc33-supply" for
>> > > a second supply...
>> >
>> > It's easier if they are CCed...
>>
>> Crud. I just assumed and didn't check the CC list. Cong: can you
>> resend and make sure you're CCing the people that get_maintainers
>> points at. One way to find that would be:
>>
>> ./scripts/get_maintainer.pl -f
>> Documentation/devicetree/bindings/input/elan,ekth6915.yaml
^ permalink raw reply
* Re: [PATCH v1 28/43] input: keypad: ep93xx: add DT support for Cirrus EP93xx
From: Andy Shevchenko @ 2023-06-01 16:54 UTC (permalink / raw)
To: Nikita Shubin
Cc: Alexander Sverdlin, Arnd Bergmann, Linus Walleij, Dmitry Torokhov,
Jonathan Cameron, Michael Peters, Kris Bahnsen, linux-input,
linux-kernel
In-Reply-To: <20230601054549.10843-10-nikita.shubin@maquefel.me>
On Thu, Jun 01, 2023 at 08:45:33AM +0300, Nikita Shubin wrote:
> - get keymap from the device tree
> - find register range from the device tree
> - get interrupts from device tree
...
> +/* flags for the ep93xx_keypad driver */
> +#define EP93XX_KEYPAD_DISABLE_3_KEY (1<<0) /* disable 3-key reset */
> +#define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */
> +#define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */
> +#define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */
> +#define EP93XX_KEYPAD_AUTOREPEAT (1<<4) /* enable key autorepeat */
> +static int ep93xx_keypad_flags;
> +module_param(ep93xx_keypad_flags, int, 0);
> +MODULE_PARM_DESC(ep93xx_keypad_flags, "EP93XX keypad flags.");
Why? This pretty much looks like missing DT description.
Please, write your commit message better, so we can understand the point of
such decisions w/o asking.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v1 1/7] dt-bindings: mmc: fsl-imx-esdhc: Add imx6ul support
From: Conor Dooley @ 2023-06-01 18:18 UTC (permalink / raw)
To: Oleksij Rempel
Cc: Abel Vesa, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Herbert Xu, David S. Miller, Dmitry Torokhov, Ulf Hansson, kernel,
Peng Fan, Fabio Estevam, NXP Linux Team, Daniel Lezcano,
Thomas Gleixner, Michael Trimarchi, Mark Brown, Dario Binacchi,
Anson Huang, Marek Vasut, linux-clk, devicetree, linux-arm-kernel,
linux-kernel, linux-crypto, linux-input, linux-mmc
In-Reply-To: <20230601101451.357662-2-o.rempel@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 2012 bytes --]
On Thu, Jun 01, 2023 at 12:14:45PM +0200, Oleksij Rempel wrote:
> Add the 'fsl,imx6ul-usdhc' value to the compatible properties list in
> the fsl-imx-esdhc.yaml file. This is required to match the compatible
> strings present in the 'mmc@2190000' node of 'imx6ul-prti6g.dtb'. This
> commit addresses the following dtbs_check warning:
> imx6ul-prti6g.dtb: mmc@2190000: compatible: 'oneOf' conditional failed,
> one must be fixed: ['fsl,imx6ul-usdhc', 'fsl,imx6sx-usdhc'] is too long
> 'fsl,imx6ul-usdhc' is not one of ['fsl,imx25-esdhc', 'fsl,imx35-esdhc',
> 'fsl,imx51-esdhc', 'fsl,imx53-esdhc', 'fsl,imx6q-usdhc',
> 'fsl,imx6sl-usdhc', 'fsl,imx6sx-usdhc', 'fsl,imx7d-usdhc',
> 'fsl,imx7ulp-usdhc', 'fsl,imx8mm-usdhc', 'fsl,imxrt1050-usdhc',
> 'nxp,s32g2-usdhc']
> From schema: Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> index fbfd822b9270..090e781705d3 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> @@ -30,6 +30,7 @@ properties:
> - fsl,imx6q-usdhc
> - fsl,imx6sl-usdhc
> - fsl,imx6sx-usdhc
> + - fsl,imx6ul-usdhc
How come this gets added as a standalone compatible _and_ one that
should fall back to imx6sx?
> - fsl,imx7d-usdhc
> - fsl,imx7ulp-usdhc
> - fsl,imx8mm-usdhc
> @@ -42,6 +43,7 @@ properties:
> - enum:
> - fsl,imx6sll-usdhc
> - fsl,imx6ull-usdhc
> + - fsl,imx6ul-usdhc
> - const: fsl,imx6sx-usdhc
> - items:
> - const: fsl,imx7d-usdhc
> --
> 2.39.2
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox