From patchwork Mon Apr 24 12:34:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin X-Patchwork-Id: 86963 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2638257vqo; Mon, 24 Apr 2023 03:24:27 -0700 (PDT) X-Google-Smtp-Source: AKy350ZXTZGxm8rCJmjodCFh+S3gdUlf7Q/itAXrxvDhSyx5uZjV9k0+8Cu+dLmtkV/T46H7oPfs X-Received: by 2002:a17:902:dac4:b0:1a9:5c41:3f8e with SMTP id q4-20020a170902dac400b001a95c413f8emr8592996plx.42.1682331867188; Mon, 24 Apr 2023 03:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682331867; cv=none; d=google.com; s=arc-20160816; b=o0Z1UwKn1Mwf/XgHG6HpdDZyh2oUhOmJ8L+StFvn74ZEKd8TS6eAdXpjxmBKOu+kCO 9r0nJPCX4j6RSIR2uhyh4UFfsU2qjNA1FXnKojU9b8amJOYwI1r1ZhQSWJyJnIeDmYFS fd95TdXWXwBrdlwbrROTaqzpp6ojxZ+lw6nvLbGwzgtMsbjc0OMrpaxqG6eYAJqxgeAE moQTlbaF2um1G7S2t7lpOmkcqzn7Qzlrc9QHFDAn/bbEaY+gYIi3f+Yy+9goNC1AflcV 4tM69iDWqU3WlTBdIWZov8Z6EHURGK8QmlXvuU4PEpEqqw3xrxL4fctAMoU4G/0sJK3b Tg0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=lZRbxaS0xiq44T/zESI4eXsgKm1tQjdSQS2qMC8kcOI=; b=frqAHP7plgbR4Uyr2yrzZSuR88zVu3FuHQ/9aypktpeejS4/AojmK0TIhfgziJFI88 hQyo/g29xmQxvXpj1synViW17I+bYAJlqyBIavjy0auvxLhYNs5UbrDIabvVjSzZtTN1 zSkizAWkadMTeyMFLTNYCRXIKaz0MsT6gDCnCiMv1wEb7ugqtelzH1rxnv20H6D6tLIb iDqlmoK/sp97W3cUz98Q+hDj8UFo1bQSTfmgJkfDJZ0JIprPRg/66FQCoEfMKNdSgKoL F/ONklqDgRGsrXtlijRmVHo42MG9tE4qXk1f9Xy/wgp2yqWBKJUYXxKOLXTlKuw4ohL2 1TdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@maquefel.me header.s=mail header.b=VdZETi2K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c15-20020a170902d48f00b001a6dba52e52si7645768plg.390.2023.04.24.03.24.14; Mon, 24 Apr 2023 03:24:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@maquefel.me header.s=mail header.b=VdZETi2K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231792AbjDXKWx (ORCPT + 99 others); Mon, 24 Apr 2023 06:22:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231791AbjDXKVy (ORCPT ); Mon, 24 Apr 2023 06:21:54 -0400 Received: from forward502b.mail.yandex.net (forward502b.mail.yandex.net [IPv6:2a02:6b8:c02:900:1:45:d181:d502]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B91B540DC; Mon, 24 Apr 2023 03:20:54 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:261e:0:640:2e3d:0]) by forward502b.mail.yandex.net (Yandex) with ESMTP id C6FE65EC79; Mon, 24 Apr 2023 12:36:01 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id JZBb1pbWwKo0-0eocMuTW; Mon, 24 Apr 2023 12:36:01 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1682328961; bh=lZRbxaS0xiq44T/zESI4eXsgKm1tQjdSQS2qMC8kcOI=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=VdZETi2KvvQVolaU2tPAozmUDXDxbWuIqXQuqwLYYAVRFgPXhBOcgRFd8tqDq9W6E 38AA8AadndV18s2PlZ9Q1ZT0aMqB0D1a7uu9SoAg4ra7qe0fC05mzGKp0hTXP3aKUr 186NKY8klPejc8zFQ71UM9OHh33ulANePgB6ArZM= Authentication-Results: mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin Cc: Arnd Bergmann , Linus Walleij , Alexander Sverdlin , Dmitry Torokhov , Jonathan Cameron , Andy Shevchenko , Lv Ruyi , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 27/43] input: keypad: ep93xx: add DT support for Cirrus EP93xx Date: Mon, 24 Apr 2023 15:34:43 +0300 Message-Id: <20230424123522.18302-28-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me> References: <20230424123522.18302-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764052820241789477?= X-GMAIL-MSGID: =?utf-8?q?1764052820241789477?= - get keymap from the device tree - find register range from the device tree - get interrupts from device tree Signed-off-by: Nikita Shubin --- Notes: Arnd Bergmann: - wildcards ep93xx to something meaningful, i.e. ep9301 - drop wrappers drivers/input/keyboard/ep93xx_keypad.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index 55075addcac2..bf77754fa4c7 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include #include #include @@ -315,10 +317,17 @@ static int ep93xx_keypad_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id ep93xx_keypad_of_ids[] = { + { .compatible = "cirrus,ep9301-keypad" }, + {}, +}; +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,