From patchwork Mon Aug 19 04:57:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 13767881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E608C52D7C for ; Mon, 19 Aug 2024 04:59:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=JOVoXvcj4Cn0QgTVrC2uIwTrsjwD3Uvd4WFAriAkPBY=; b=UVtEYC2IHVzIzwtb2QXBqPq5bG tHisq22g+Y+wSeC2fJ5ivPxJ0yxmHrt2H9QePX4vVE4ifvHHyedTCxiseOGHtEGzQe5EntnbQqQZw M6it5wlBySfeUWDaysbgps72t8HBs4riIzQ6/ZSFj2eCmEAyk8hJVcxekfyJNyKfp2RcMAbZmcX07 ZZbJXkDLtPkjhXQyQFIhFmlYqUWrw+1/DBaVzhXxzxwujHKIBheCrERNeE/+2+GSufjPxv79IqKM2 zGB/qCAgKGXoWg5AgM/61OvokNLwiSRFr58Knux7xJTtdnqM/4GqqboLfTRZzecura/3/mNvySLDb BHE3N6Ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sfuU1-00000000LiW-4939; Mon, 19 Aug 2024 04:59:09 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sfuTL-00000000LVd-1B3T for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2024 04:58:28 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-201fba05363so22315665ad.3 for ; Sun, 18 Aug 2024 21:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724043506; x=1724648306; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JOVoXvcj4Cn0QgTVrC2uIwTrsjwD3Uvd4WFAriAkPBY=; b=TIWvTMhppV/XxNUNj83PTdFjGkoC+3KS8q0lnrEK13F/5P42jBaHYfoSelD0z3Mnv4 C2hksgNg1G4tuTAfSBeknO44BSj4803ULsayVF9f5dR+aEIDmvjIfgV4CJuUDjUT2xYy GAw8pFoAqDaDjYShv8fDi6zwaMo8YhIJfoFIKTtrn+nUoXnJRqVbUd87ay+gRe3SbK1r RrQH+PLD2B9dt2N1BA1smGI5IkmB0WPa3ONzj0GclGNqNsI1Jx9tFbmAm+yfilBe9ZLF xfFvoFLZOcBVW1DLsSN0oy931mzmaX0kCvEfOkfRLrCPUtuxEC0ePWvaHrCE/WRqmdWR tsow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724043506; x=1724648306; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JOVoXvcj4Cn0QgTVrC2uIwTrsjwD3Uvd4WFAriAkPBY=; b=dH+S8oqRbuAQabhtVdPsc1qyyCvIMXu4DirpPKXFC4wlt2Vi5WhMU8HWGj+JiYq1se LgUqhZ4X8iwj5XgAirzE0btDs4OWmrSZc4V0Wve1u7/KtVBIXni5n3DSoY4FPwcWKpCl ft9ObKIWwL3HhZAy1PAu41tGOEpINTTpPR8MKZ+ldGQtHDLYSLiqo5fDHI0xcxKhaM10 aErx1jmXWFUzm5MjBh5SkN3Qm3EuLKwYyppnrOAZ0Cx4+zmWg4MI6fpd4fD+mrGIYGe7 TiQiTm75+AOnCjzvyqh6gXWY9azJizvtwad9oE7g3AjJX7RJbf2TUCzKv8uDAJMrfiXa EdHA== X-Forwarded-Encrypted: i=1; AJvYcCXkWt3fWBLQa73m3IXNa2eiFHqgMBia43bYh7TOPj71knV/2iogY2ioJaENCUHpIoT7n2HqYtYtyTeRlWUy7yQi76C7Mys0LSiLI9n9wQhGCDnZ6q8= X-Gm-Message-State: AOJu0Ywo0jHWXqEkYe1OOusQMEIwbA0zMAhI7Dw/OeiTKxzxLCk+w8oe uxVGSCdz8Ik8cRYI7KqR1rHI3RXXzzgC5e/ViMl3HmmUIxCGlDn3 X-Google-Smtp-Source: AGHT+IEJGn5PVasUJVsx/uK8VLnavHd3PelxJImB1HsqxNz46WkgjVgZaV6xLgHVa8kdhAa3cLHWxw== X-Received: by 2002:a17:903:192:b0:202:301f:36fd with SMTP id d9443c01a7336-202301f38f5mr23768775ad.18.1724043505296; Sun, 18 Aug 2024 21:58:25 -0700 (PDT) Received: from dtor-ws.sjc.corp.google.com ([2620:15c:9d:2:4eb5:4500:6efc:6c24]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-202068497b4sm43483445ad.269.2024.08.18.21.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Aug 2024 21:58:24 -0700 (PDT) From: Dmitry Torokhov To: Arnd Bergmann , Mark Brown , Krzysztof Kozlowski Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 00/14] Remove support for platform data from samsung keypad Date: Sun, 18 Aug 2024 21:57:57 -0700 Message-ID: <20240819045813.2154642-1-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.46.0.184.g6999bdac58-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240818_215827_348858_B47C592D X-CRM114-Status: GOOD ( 17.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This series attempts to rework samsumg=keypad driver to stop using platform data and instead rely on generic device properties only. The first 8 patches are general cleanup/facelift patches. The 9th patch introduces alternative binding that is more compact that the original one, which makes it more suitable for use in legacy (non DT) boards with static device properties. Note that the "new" binding is the standard binding for matrix keypads. Patch #10 implements the new binding in the driver, #11 converts the only user of platform data in the mainline tree to the static device properties, and #12 drops support for platform data from the driver. Patches #13 and #14 are "bonus" converting the rest of crag6410 to use software nodes/properties to describe GPIO keys, LEDs and other peripherals. Note that I believe they fix and issue with recent conversion to GPIO lookup tables - the names of gpiochip structures I think are "GP" ("GPK", "GPL", etc) and not "GPIO". Mark, you said you are using this board, it would be great if you could give this a spin. Thanks! Dmitry Torokhov (14): Input: samsung-keypad - switch to using devm_clk_get_prepared() Input: samsung-keypad - do not set input device's parent explicitly Input: samsung-keypad - do not combine memory allocation checks Input: samsung-keypad - use struct_size() helper Input: samsung-keypad - use devm to disable runtime PM Input: samsung-keypad - use guard notation to acquire mutex Input: samsung-keypad - use per-chip parameters Input: samsung-keypad - use BIT() and GENMASK() where appropriate dt-bindings: input: samsung,s3c6410-keypad: introduce compact binding Input: samsung-keypad - handle compact binding ARM: s3c: crag6410: switch keypad device to software properties Input: samsung-keypad - remove support for platform data ARM: s3c: crag6410: use software nodes/properties to set up GPIO keys ARM: s3c: crag6410 - convert GPIO lookup tables to property entries .../input/samsung,s3c6410-keypad.yaml | 57 +++- arch/arm/mach-s3c/Kconfig | 5 - arch/arm/mach-s3c/Kconfig.s3c64xx | 1 - arch/arm/mach-s3c/Makefile.s3c64xx | 1 - arch/arm/mach-s3c/devs.c | 62 ---- arch/arm/mach-s3c/devs.h | 2 - arch/arm/mach-s3c/gpio-samsung-s3c64xx.h | 5 + arch/arm/mach-s3c/gpio-samsung.c | 35 ++ arch/arm/mach-s3c/keypad.h | 27 -- arch/arm/mach-s3c/mach-crag6410.c | 242 ++++++++----- arch/arm/mach-s3c/setup-keypad-s3c64xx.c | 20 -- drivers/input/keyboard/samsung-keypad.c | 318 ++++++++---------- include/linux/input/samsung-keypad.h | 39 --- 13 files changed, 398 insertions(+), 416 deletions(-) delete mode 100644 arch/arm/mach-s3c/keypad.h delete mode 100644 arch/arm/mach-s3c/setup-keypad-s3c64xx.c delete mode 100644 include/linux/input/samsung-keypad.h