From patchwork Mon Jul 17 22:25:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Joaqu=C3=ADn_Ignacio_Aramend=C3=ADa?= X-Patchwork-Id: 12173 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1379629vqt; Mon, 17 Jul 2023 15:36:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlFN7HLlehWuY4Kd/E2tY/Wo4bA9HgwqXfWpJIe5c55AV8z8jgtW3mtPi1ku0hxNYAdka5li X-Received: by 2002:a5d:4eca:0:b0:314:362d:6d7b with SMTP id s10-20020a5d4eca000000b00314362d6d7bmr12915920wrv.19.1689633368590; Mon, 17 Jul 2023 15:36:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689633368; cv=none; d=google.com; s=arc-20160816; b=VH6H9RmHPj6MyUxchGOM4d7+GodTIapwbfHGMAQCw+m47A5235lbYrk7LhC9vySHhO rI7FLZ/u4FzjLjiDZ9PfS9Bk0CFnH2DLju2fJIF/I2AX+L5UhqznLf+X4EM6zlbZWtkH lvFYsh+BHr1eS1ESgDqfhBVJQCc+x31gcfUdVzmgOV4YPH6qx05j54Viq6YTZWdkP56a Z+STG27QWoH+yrfIv3OGfgZQez5VKRHYkgXUB93hZc2Jd26BiVA5dBvJEgOnhAkZBsV7 vAnSk3bpvSR1QNEJUCtywpsSOo7f3l+QEOEp/u6KhtI8DIGZbE8EMcGYYpXqmWQLTtUe G/gw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=H8+m1PD1OV/T4vMth1o/3b8d3uLDURVNRPW6GjP1Nfs=; fh=h793OaUni30alKFb4D+hGQdzb3dwmJ62PCcOI4idbnU=; b=SDdemTvwNzmuZ1+07RVNHWBBXyRAxwtBJ/bGPtY2jP5ZKX/2w9l20n0PvMlDQMhJ3s 48lM+nHWgy1rVJNvWwNy0ajVfYEpnFW1nP333cbN6WkYLQzJKSBZFtP8X/5qYEQMuiAw 2X/yxkWTpY3DNBy2xM8BKQIw9nvKt61DgKae0fc+Csj6OSwiOkmcreVq2eccamJJweEQ LnldgXVR/i2v1SE8ZoSoj9plAbjkGN3kFbYKBFbfvZFRF7/TGxq664P6jdN1g0ZFZv7j RXoqPM77zRURgS5T6THLd7Yt4yNByXJxRvIXdjzoJPECE4TrT8fxIZteY+8M9YuLSmPd 7idA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=TDebd7yP; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l1-20020aa7cac1000000b0051fde3f49cdsi239963edt.531.2023.07.17.15.35.45; Mon, 17 Jul 2023 15:36:08 -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=pass header.i=@gmail.com header.s=20221208 header.b=TDebd7yP; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbjGQWZl (ORCPT + 99 others); Mon, 17 Jul 2023 18:25:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjGQWZj (ORCPT ); Mon, 17 Jul 2023 18:25:39 -0400 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4289AD; Mon, 17 Jul 2023 15:25:38 -0700 (PDT) Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-6b9c5362a51so1959589a34.0; Mon, 17 Jul 2023 15:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689632738; x=1692224738; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=H8+m1PD1OV/T4vMth1o/3b8d3uLDURVNRPW6GjP1Nfs=; b=TDebd7yPRGqPxaM5ODAw7ZQJy48JGvV0rw0DfVAXn2C6meWRSrVMVJDmWiIbeqUiV7 XxjcZqULoUkkl9g7Z83ez/BprYj/3IoAGNede/r6FGS/DCc7GYQK/THKGJGMomyygkcS kboyn2Xzj0Gn17uZ1zreypTjKKgeeQ8apmmZHk9GZ2/EEuYKtcV5b9UXBWaVaUI5O8Dq 0d+2NycV/hXszI8s24d1ZBbKd+6f1jKbKiqjFcNw2sg07tWRpI104SJqqJu2mxxbyl1n lblYGKB4HEs50hF1XTWHH0Uko3gSA99VTd1SnpJhV2X3+0Unh4cIwWeCx5VPh6igCLFb U3xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689632738; x=1692224738; 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=H8+m1PD1OV/T4vMth1o/3b8d3uLDURVNRPW6GjP1Nfs=; b=P67ty9yssiWmLRLKDWIYUi1l6M047VjbahpDQnuRMcrknfZLk3/tRLsvKy6rfPKVUr rq8wQku6UkE3Wtd1xUCSYhw2So9n1vg5ih/lEf9uMW2xT17+CqB7y6EmIPwTjzhTjxSi 5C7ErE9jVvVjVr/7pcNXX+u+0hVuyib0aJtW9+P333pMpaUFL8yQAFEQTdG296FlMEAs y8XvAdYD+tzyDSrGq5Z38TiTdXzlxjGG/8JUolZU6Ba0QirqIslF64AKvpgINEXQjdeg 6Qd75ouOSR5aRuLS54vMq4iSqBwjvMlqvpV1vFthLov/AmQSC8sx3QWjMsTs7vUb7Vzt z99g== X-Gm-Message-State: ABy/qLY53nUqrQbnpiXh/iPUTW+puGXRHH1URWA2MkElMk/z9ENoQOyq 1KNv7lYiwSqY/Sz4oEaIswQ= X-Received: by 2002:a05:6870:589b:b0:1b3:eec8:fa94 with SMTP id be27-20020a056870589b00b001b3eec8fa94mr13299018oab.7.1689632738096; Mon, 17 Jul 2023 15:25:38 -0700 (PDT) Received: from smeagol.fibertel.com.ar ([201.235.4.68]) by smtp.gmail.com with ESMTPSA id a7-20020a056870374700b001ba72480f2fsm385553oak.43.2023.07.17.15.25.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 15:25:37 -0700 (PDT) From: =?utf-8?q?Joaqu=C3=ADn_Ignacio_Aramend=C3=ADa?= To: linux@roeck-us.net Cc: =?utf-8?q?Joaqu=C3=ADn_Ignacio_Aramend=C3=ADa?= , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Subject: [PATCH v2 0/2] hwmon: (oxp-sensors) Refactor probe() and init() and remove devm_add_groups() Date: Mon, 17 Jul 2023 19:25:14 -0300 Message-ID: <20230717222526.229984-1-samsagax@gmail.com> X-Mailer: git-send-email 2.41.0 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,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771673762880081824 X-GMAIL-MSGID: 1771708999068254424 Remove the use of devm_add_groups() in favour of dev_groups in platform driver structure. This will allow for removal of the function as it was intended in Greg's email[1]. Also move board detection to the init() instead of probe() function so we don't instantiate the driver if the detection fails. V2 drops the 3rd patch that removed the probe() function. [1] Link: https://lore.kernel.org/linux-hwmon/ZKW7WuP0T9QdCR+G@google.com/ Joaquín Ignacio Aramendía (2): hwmon: (oxp-sensors) Move tt_toggle attribute to dev_groups hwmon: (oxp-sensors) Move board detection to the init function drivers/hwmon/oxp-sensors.c | 67 +++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 28 deletions(-)