From patchwork Fri May 9 09:14:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Dubois-Briand X-Patchwork-Id: 888892 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD0562749EA; Fri, 9 May 2025 09:14:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746782089; cv=none; b=El9cvOBnlMnUSo8KrlRDAQ7l6lz94MywM/u0Yn/6WBxLu//7H9bJgbs8TjOU7WNntC0CInmD+RVdPpuPUKQvA+6yf9t9FStYeqvVdHndKGcdquCEsGvENhl4k7PZWxWDAp5VT26SdMtPoB8VRq2gnZWOB0E1YrGL579sBHeA4Bk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746782089; c=relaxed/simple; bh=Pjl3EREY5LiWOhcSvNDn75zyN/l4OFQm6DQH1t57WZg=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=RLSZfgwzv1ourLSbgjsVW9kA+fPuGX9AEDoukMGA0Ojw1m7JVnGZlRYIMNoZIUlb/ESqUoI4+kXj4v7E1x30+lGCzKSrtXJZLB5flCgdX4pl4+rYYjMDBreqjO3qjQktNyet+GeyZSp69UYXCODiRIVu124L/I1k1sKyc6viq8w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=OA5zzACj; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="OA5zzACj" Received: by mail.gandi.net (Postfix) with ESMTPSA id A71A31FCE8; Fri, 9 May 2025 09:14:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1746782084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hVntwzxyBXjpBTpUWsOOR228EJ/vNqlIhJFXSCTCUsI=; b=OA5zzACjhZAzqxCj4VsWpBQ/16ZwXBfKVU7Hcx9Ug7+fWbdGqMDpd0oT3r4hCWtNMTyx2u 8jf7MTAQ/0Sx3rgSaI4U0ur1g9+mt9yqkT76ZSB68uHIL7NYhRxaA+sIypWhLlLsJIVX3L S4u8KxQYMWKgYXD6lgiHZRBXnxYY27Muc6lEV9MmHOX34Opf30NYee9GC6kbz9KKEWf0l4 yt1eEV3YFXR1eOKVDKwF7W/4s0cqymMtWiqN471/R41e6I9snWrpCNhpp6b32aTFubm9k6 BROGJxdjnBCRnQDO/tQLhLo9uSK8VbZvb0awd+mXwWjNceYM+41v995t4FENzg== From: Mathieu Dubois-Briand Subject: [PATCH v8 00/11] Add support for MAX7360 Date: Fri, 09 May 2025 11:14:34 +0200 Message-Id: <20250509-mdb-max7360-support-v8-0-bbe486f6bcb7@bootlin.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAHrHHWgC/33Qy2rDMBAF0F8JWldFmtGzq/5H6UIvN4I6MrZrU oL/vXKgOMV2l3fQHF3pRobU5zSQl9ON9GnKQy6XGszTiYSzu3wkmmPNBBgIDtzSNnrauqtGxej w1XWlHykAOhOSkN4hqZtdn5p8vatv7zWf8zCW/vt+ycSX6f/exCmjJhnkWprl2KsvZfzMl+dQW rKIEzwogPsKVAW1MxEgoEpxq+CvIhnnBwpWxUpuvXDBM7/TRawKcLGviOVFDmVQ0Xur1FaRq4L c7CuyKo0H5l1jdXRsq6hVEezgd1VVtAOJ0miV0G4V/aDAQRddFZGYYiYyp5vmrzLP8w8Z5u0tX AIAAA== To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kamel Bouhara , Linus Walleij , Bartosz Golaszewski , Dmitry Torokhov , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Michael Walle , Mark Brown , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, linux-pwm@vger.kernel.org, andriy.shevchenko@intel.com, =?utf-8?q?Gr=C3=A9?= =?utf-8?q?gory_Clement?= , Thomas Petazzoni , Mathieu Dubois-Briand , Andy Shevchenko , Bartosz Golaszewski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1746782082; l=5604; i=mathieu.dubois-briand@bootlin.com; s=20241219; h=from:subject:message-id; bh=Pjl3EREY5LiWOhcSvNDn75zyN/l4OFQm6DQH1t57WZg=; b=ef8zZbW4m70jesD6XP8nEOXP+q9ThhCvizPmHWlqwtx37AiXgapg+qEYEa3p/wkZIdhcmZB/1 nDN7Hm44j+2CBjHFEY+6JZlzNbedAhmI5h8eQeYRyfZboZbRs0whSkN X-Developer-Key: i=mathieu.dubois-briand@bootlin.com; a=ed25519; pk=1PVTmzPXfKvDwcPUzG0aqdGoKZJA3b9s+3DqRlm0Lww= X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvledvvdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhufffkfggtgfgvfevofesthejredtredtjeenucfhrhhomhepofgrthhhihgvuhcuffhusghoihhsqdeurhhirghnugcuoehmrghthhhivghurdguuhgsohhishdqsghrihgrnhgusegsohhothhlihhnrdgtohhmqeenucggtffrrghtthgvrhhnpefhkeffueegvdekiefhfeejueeukeekgeegjeeghefgvdekveevvdekieetkeelveenucffohhmrghinhepkhgvrhhnvghlrdhorhhgpddugedqrhgtvddrqdhlihhnkhenucfkphepvdgrtddumegtsgdugeemheehieemjegrtddtmeeffhgtfhemfhgstdgumeduvdeivdemvdgvjeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddumegtsgdugeemheehieemjegrtddtmeeffhgtfhemfhgstdgumeduvdeivdemvdgvjeeipdhhvghloheplgduvdejrddtrddurddungdpmhgrihhlfhhrohhmpehmrghthhhivghurdguuhgsohhishdqsghrihgrnhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopedvhedprhgtphhtthhopegtohhnohhrodgutheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosghhsehkvghrn hgvlhdrohhrghdprhgtphhtthhopehmrghthhhivghurdguuhgsohhishdqsghrihgrnhgusegsohhothhlihhnrdgtohhmpdhrtghpthhtoheprghnughrihihrdhshhgvvhgthhgvnhhkoheslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehlihhnuhigqdhpfihmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepuggrkhhrsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhhsrdifrghllhgvihhjsehlihhnrghrohdrohhrghdprhgtphhtthhopehukhhlvghinhgvkheskhgvrhhnvghlrdhorhhg X-GND-Sasl: mathieu.dubois-briand@bootlin.com This series implements a set of drivers allowing to support the Maxim Integrated MAX7360 device. The MAX7360 is an I2C key-switch and led controller, with following functionalities: - Keypad controller for a key matrix of up to 8 rows and 8 columns. - Rotary encoder support, for a single rotary encoder. - Up to 8 PWM outputs. - Up to 8 GPIOs with support for interrupts and 6 GPOs. Chipset pins are shared between all functionalities, so all cannot be used at the same time. Signed-off-by: Mathieu Dubois-Briand --- Changes in v8: - Small changes in drivers. - Rebased on v6.15-rc5 - Link to v7: https://lore.kernel.org/r/20250428-mdb-max7360-support-v7-0-4e0608d0a7ff@bootlin.com Changes in v7: - Add rotary encoder absolute axis support in device tree bindings and driver. - Lot of small changes in keypad, rotary encoder and GPIO drivers. - Rebased on v6.15-rc4 - Link to v6: https://lore.kernel.org/r/20250409-mdb-max7360-support-v6-0-7a2535876e39@bootlin.com Changes in v6: - Rebased on v6.15-rc1. - Use device_set_of_node_from_dev() instead of creating PWM and Pinctrl on parent device. - Various small fixes in all drivers. - Fix pins property pattern in pinctrl dt bindings. - Link to v5: https://lore.kernel.org/r/20250318-mdb-max7360-support-v5-0-fb20baf97da0@bootlin.com Changes in v5: - Add pinctrl driver to replace the previous use of request()/free() callbacks for PORT pins. - Remove ngpios property from GPIO device tree bindings. - Use GPIO valid_mask to mark unusable keypad columns GPOs, instead of changing ngpios. - Drop patches adding support for request()/free() callbacks in GPIO regmap and gpio_regmap_get_ngpio(). - Allow gpio_regmap_register() to create the associated regmap IRQ. - Various fixes in MFD, PWM, GPIO and KEYPAD drivers. - Link to v4: https://lore.kernel.org/r/20250214-mdb-max7360-support-v4-0-8a35c6dbb966@bootlin.com Changes in v4: - Modified the GPIO driver to use gpio-regmap and regmap-irq. - Add support for request()/free() callbacks in gpio-regmap. - Add support for status_is_level in regmap-irq. - Switched the PWM driver to waveform callbacks. - Various small fixes in MFD, PWM, GPIO drivers and dt bindings. - Rebased on v6.14-rc2. - Link to v3: https://lore.kernel.org/r/20250113-mdb-max7360-support-v3-0-9519b4acb0b1@bootlin.com Changes in v3: - Fix MFD device tree binding to add gpio child nodes. - Fix various small issues in device tree bindings. - Add missing line returns in error messages. - Use dev_err_probe() when possible. - Link to v2: https://lore.kernel.org/r/20241223-mdb-max7360-support-v2-0-37a8d22c36ed@bootlin.com Changes in v2: - Removing device tree subnodes for keypad, rotary encoder and pwm functionalities. - Fixed dt-bindings syntax and naming. - Fixed missing handling of requested period in PWM driver. - Cleanup of the code - Link to v1: https://lore.kernel.org/r/20241219-mdb-max7360-support-v1-0-8e8317584121@bootlin.com --- Kamel Bouhara (2): mfd: Add max7360 support pwm: max7360: Add MAX7360 PWM support Mathieu Dubois-Briand (9): dt-bindings: mfd: gpio: Add MAX7360 pinctrl: Add MAX7360 pinctrl driver regmap: irq: Add support for chips without separate IRQ status gpio: regmap: Allow to allocate regmap-irq device gpio: regmap: Allow to provide init_valid_mask callback gpio: max7360: Add MAX7360 gpio support input: keyboard: Add support for MAX7360 keypad input: misc: Add support for MAX7360 rotary MAINTAINERS: Add entry on MAX7360 driver .../bindings/gpio/maxim,max7360-gpio.yaml | 83 ++++++ .../devicetree/bindings/mfd/maxim,max7360.yaml | 191 +++++++++++++ MAINTAINERS | 13 + drivers/base/regmap/regmap-irq.c | 99 ++++--- drivers/gpio/Kconfig | 12 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-max7360.c | 257 +++++++++++++++++ drivers/gpio/gpio-regmap.c | 22 +- drivers/input/keyboard/Kconfig | 12 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/max7360-keypad.c | 308 +++++++++++++++++++++ drivers/input/misc/Kconfig | 10 + drivers/input/misc/Makefile | 1 + drivers/input/misc/max7360-rotary.c | 192 +++++++++++++ drivers/mfd/Kconfig | 14 + drivers/mfd/Makefile | 1 + drivers/mfd/max7360.c | 170 ++++++++++++ drivers/pinctrl/Kconfig | 11 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-max7360.c | 214 ++++++++++++++ drivers/pwm/Kconfig | 10 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-max7360.c | 186 +++++++++++++ include/linux/gpio/regmap.h | 18 ++ include/linux/mfd/max7360.h | 109 ++++++++ include/linux/regmap.h | 3 + 26 files changed, 1907 insertions(+), 33 deletions(-) --- base-commit: 92a09c47464d040866cf2b4cd052bc60555185fb change-id: 20241219-mdb-max7360-support-223a8ce45ba3 Best regards,