From patchwork Mon Jan 9 23:35:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cormier X-Patchwork-Id: 41222 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2441169wrt; Mon, 9 Jan 2023 15:38:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXsYIKG0z2kl4Jm+uD5tCEmJPPIVtW1+gMNwmU9tulYZA0mZ5qS5maylBYWa1zqoVNtwOHWM X-Received: by 2002:a17:907:a08d:b0:7c1:6986:2b7c with SMTP id hu13-20020a170907a08d00b007c169862b7cmr51141915ejc.8.1673307536650; Mon, 09 Jan 2023 15:38:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673307536; cv=none; d=google.com; s=arc-20160816; b=vXqqzJIWxS0Xu/Yf34KajZwp/cjIqQPB7pAdnjW7Onp7H+J9apKKcWcLMtyXQVdd+F dyIg02Ss/jUg0JWLGjl4Wo47sYqJsjoOV5lNDNB0xonI8xqvdwYrJmp/hhgrqms9sjT5 OkhE+I5rz0VlVaDVnLBR0VDgvaNFUB2JiuoiWsDeCv97qVNezX2e4t7gdh7fAQjvAGTX OQWBcWOUfM1T6s6L5bgZUahk/fQD8KGpi3eXIypGdr9BXEVc1qwMGaWWJ2FpcTOF9vdN WAJfC/+N00Zp8i1tNakEPhz0IRcV7mpkqZBeVq9fLrsGv2xttUFidfIKnmjIBxCTpB3j s6+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=foqffIKuz799F5wyGtIM3OCFdqRESGZUJXSmZJH7pvM=; b=BvCsDeR6zFuKicNdqSZLSEMDwd6bASLQWXwHMGMpuuUxz6NnK9PC3+xBEnRVWP/vhH 5NbvCSMBk9iRRgyd6VjqU1pv+4u3bNI0KqiuLCO7C3aHX6o10oNv32w7OnCD9S6YKHNg 0cavAZ1Q6aXg/F0B6ilHInqaPgabnEQMGcxgYxIT5srBxprXWy9j/OmFu0lXnTtrvmwQ 1CyjKaeayeBRMA97xoJSwvQCwDk5L1Hp5G/BBaEdzH0mowdi2jKc9qKdE2C966zOc+oH BL5SHMHsYKLwB3re2FhwbUV3jMgzS/pDezXQqXanwWixPoguNSfqRrPr+Q0l5j3lG8No zfMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@criticallink.com header.s=google header.b=LW23jYdp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=criticallink.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb40-20020a1709076da800b007baa6e2275asi11841409ejc.236.2023.01.09.15.38.32; Mon, 09 Jan 2023 15:38:56 -0800 (PST) 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=pass header.i=@criticallink.com header.s=google header.b=LW23jYdp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=criticallink.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237667AbjAIXgN (ORCPT + 99 others); Mon, 9 Jan 2023 18:36:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237780AbjAIXgB (ORCPT ); Mon, 9 Jan 2023 18:36:01 -0500 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CB37CE38 for ; Mon, 9 Jan 2023 15:35:58 -0800 (PST) Received: by mail-qt1-x836.google.com with SMTP id h26so9585102qtu.2 for ; Mon, 09 Jan 2023 15:35:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=criticallink.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=foqffIKuz799F5wyGtIM3OCFdqRESGZUJXSmZJH7pvM=; b=LW23jYdpmTZPKAu1WNAQKdJrg5k7NJiFihuZiyYCDKpFVyPTxoX3R+4j2E/8C20sGz DdPxbKkkaAXqsaLfqLHBFijQTc6CYz4U5GpoJYjEsTG2PZKxaVtq3Tso9AiBDCHhXqV5 dq4q63L+CIGkpvTwRe98VF3jzL3qibGsXp6E2Bp4lvs5DB1lIG6ZTjSP4pDpVhX8L2nC L4XNW6VIMQsR9lcNlSxeJmkqwFkxnsgA5AbemvE2r/Ld4N8ubsHn0FDVZDZH2dK/oHJo FkzrdomLx36tBU+wDHxCLM7SJc/fIRMyhdh9dXD9cnbf7gFtv7nAktBx0YFhFZvEsrXs A5GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=foqffIKuz799F5wyGtIM3OCFdqRESGZUJXSmZJH7pvM=; b=EbKnZ7jj9nD++5/3/ZbMnpp9fknE7IuZhoWDm0RBLx3ah0Thl9xtApOH514QpPZ6vL eIpfErqRemgJ49p3RC9QdnRK6S/8mYnIIfq8FqAykkITkKHABIxufNguXl4+kgcm+tY1 IjbBUKiEWYj/8lqZPo/ii01iHtCuPHE1S3DQuytgbLIQQVIuCFLJo5AlHdde/1+cklOL MlW9zJ3byWEi/wW7lIcIGYq9hYcr5hOWasrIvB3z+l/HgU9AY7Nht3O6QCKo8UrGeG3u ZQWA0nLQbr2HhD8KDS13SDtvovvOZIe+uLsDyNmAByunbyKCoaVURkLQ9b1YaTkmyG0r PH3A== X-Gm-Message-State: AFqh2kptqguVxRZTcTtpE0R5Kwl/LBpF5VT3noUGeSYY+Y1z8egx6qJf YAMxVk0ujiqz3X/cA/nNa1RECg== X-Received: by 2002:ac8:5557:0:b0:3ab:5b6d:1add with SMTP id o23-20020ac85557000000b003ab5b6d1addmr99038370qtr.66.1673307357915; Mon, 09 Jan 2023 15:35:57 -0800 (PST) Received: from jcormier-MS-7A93.syr.criticallink.com (static-72-90-70-109.syrcny.fios.verizon.net. [72.90.70.109]) by smtp.gmail.com with ESMTPSA id t5-20020a05620a450500b006fa8299b4d5sm6294846qkp.100.2023.01.09.15.35.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 15:35:57 -0800 (PST) From: Jonathan Cormier To: linux-hwmon@vger.kernel.org Cc: Jonathan Cormier , Jean Delvare , Guenter Roeck , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Bob Duke , John Pruitt Subject: [PATCH v3 2/5] hwmon: ltc2945: Add devicetree match table Date: Mon, 9 Jan 2023 18:35:31 -0500 Message-Id: <20230109233534.1932370-3-jcormier@criticallink.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230109233534.1932370-1-jcormier@criticallink.com> References: <20221214220727.1350784-3-jcormier@criticallink.com> <20230109233534.1932370-1-jcormier@criticallink.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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?1754590123695544465?= X-GMAIL-MSGID: =?utf-8?q?1754590123695544465?= Add adi,ltc2945 compatible Signed-off-by: Jonathan Cormier --- drivers/hwmon/ltc2945.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/ltc2945.c b/drivers/hwmon/ltc2945.c index 9adebb59f604..9af3e3821152 100644 --- a/drivers/hwmon/ltc2945.c +++ b/drivers/hwmon/ltc2945.c @@ -58,6 +58,12 @@ #define CONTROL_MULT_SELECT (1 << 0) #define CONTROL_TEST_MODE (1 << 4) +static const struct of_device_id __maybe_unused ltc2945_of_match[] = { + { .compatible = "adi,ltc2945" }, + { } +}; +MODULE_DEVICE_TABLE(of, ltc2945_of_match); + static inline bool is_power_reg(u8 reg) { return reg < LTC2945_SENSE_H; @@ -475,8 +481,9 @@ MODULE_DEVICE_TABLE(i2c, ltc2945_id); static struct i2c_driver ltc2945_driver = { .driver = { - .name = "ltc2945", - }, + .name = "ltc2945", + .of_match_table = of_match_ptr(ltc2945_of_match), + }, .probe_new = ltc2945_probe, .id_table = ltc2945_id, };