Message ID | cover.1667151588.git.ang.iglesiasg@gmail.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1900407wru; Sun, 30 Oct 2022 10:56:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4UgCkK0mZXF6KSIKOeY9JQFv0Uoq4CskkkqOorp5omoxKp1K8XrH9lj+jc5gVy2s4hoCia X-Received: by 2002:a65:6bd4:0:b0:443:94a1:429c with SMTP id e20-20020a656bd4000000b0044394a1429cmr9160528pgw.606.1667152583575; Sun, 30 Oct 2022 10:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667152583; cv=none; d=google.com; s=arc-20160816; b=Z7o2aB7c7hcPhG442Wfd7AlBdiL3tDBPpFbT6bvk8vqgogqNPhiEzKQ7w3MZOaObXR fZu1Ja65aTWHgEE0Qg4cRasHv4ms3fd//upONXw4qaHbZgeY5lU8eB+rpmJVX85gh4wD 2cZFqpYAz1yBLhayJuC3g8VJBv6pIKIvJyjkHbB93Q/bjOUZ+3brbOjFGO8DvV0dPjXj gKWie4gIg0wJJTqImv4OeeVjUHkH8gVG4deJj8cEsTSE1tx2CZ/7juDiaNZvVQFJOO7t UxMM6JSq4gPjSztIsCHJjok43wg5vhmItKLymtroFaX/+yzOQGdomgGhniArW/yNPuAR mqFg== 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=iRGQwiJyyZtZTz3TByj9KEqkFvLoG13HbwyG6xbLJsA=; b=ElddZezHeUV0oyvYz8mlKpeG2Zz3HdZp5Y4hHeJ+UiDtFil1nrhTbzXGMw617bQ1gG jIgTNNqYXEJfCv6rIKWDcrMxAT4lUd4+bG3NxN5oP45eaNpBBGpI5R6HexWjqEdPG50X tCA763V1ZjZ5YUin6MamzMDvVsNx098VzFp6rKbYwv1omRy8FpSDRwuvNwYDYr2TlVcB T8JuNDXBVIgIEkdcwLSDkMicbM1/Cz8uKEYvsJlW+D0B4UPf/cbmEqffhnRtvy4DQDzw KheTv+XN2bpc1y6uuyyzGg34cHxQaoZGi7NJoogQoduOpS9MPzyDaDFBCI/V73Wn/uNW TdYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FAckUJwd; 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 nl6-20020a17090b384600b00213054baa79si6131472pjb.0.2022.10.30.10.56.11; Sun, 30 Oct 2022 10:56:23 -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=20210112 header.b=FAckUJwd; 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 S229619AbiJ3RwP (ORCPT <rfc822;makky5685@gmail.com> + 99 others); Sun, 30 Oct 2022 13:52:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiJ3RwO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 30 Oct 2022 13:52:14 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E483C14; Sun, 30 Oct 2022 10:52:12 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id h9so13132971wrt.0; Sun, 30 Oct 2022 10:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=iRGQwiJyyZtZTz3TByj9KEqkFvLoG13HbwyG6xbLJsA=; b=FAckUJwd6EZu55q7Mb7vIO0E3XAFW3dHy41sLo7QgJxjCpa26PyWWGGAMN/XFJpbQd 59Np4n5e/+Loxc9ipdU4d2YPhh1U78AhhqNjeG7W8p43DsGTnVtFhwW0Hl3CVfmkkWaU lApgSmjrooGqN/MavVzATDssXOtnoiiu2/7OalPsQzgJ9QV+RVUrqBJ0xAKYg3EldGPF lmfA4TnGFSlbcgwfGqHw4SL2+wJllxXz90zxMhbRQzJkm/UW5pZK3InndwZF2C0TJHsg CwCXwlMV/LEOJn0RtXBzlzevVxU0Etq06wr5ihtsbFlzeGyza6Nht3WE/6OxSE85cJEX XkHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=iRGQwiJyyZtZTz3TByj9KEqkFvLoG13HbwyG6xbLJsA=; b=VnROlqCvwH4lcCTwnyS28dvAano9ThlIwk4+u/tUVskX7LNwkJY/RQsA1SfQYMwFYp y8R+mhB92a/vrtrMHxHywVCSgfvnDxFs6AO15NaBoGU8go/mJ5pGT/bTVYFwl8GvPwJs PvY0iNpfm/8ETOUN+6GF7p9p3iSsp5eSbpV6QT0nf0+AZ5mc9DIXg8PnjqSU9IIQogwN Y3oZswqs+gEZ9hc0yTvJvmMrMXJ8IrRY6vt7pVAX2AXB2ZfAKTAXUINOvdU2nAyQCF/B pQpKF7o17eoKNfGFY1odepTVMVaPSqLyVDUhFQrntRmqfGQJ9GArWoieTGNnqUDrXAB+ Bnuw== X-Gm-Message-State: ACrzQf0S3+q6A6uqUjz0kLw7Ocx/V7THrYnll7sx273gEZxwR6BBUStN hNDXic++VBk3hn1z9OPEMZTlAlcg0r4= X-Received: by 2002:a05:6000:10ce:b0:236:54c8:e040 with SMTP id b14-20020a05600010ce00b0023654c8e040mr5660243wrx.290.1667152330891; Sun, 30 Oct 2022 10:52:10 -0700 (PDT) Received: from localhost.localdomain (188.red-83-35-57.dynamicip.rima-tde.net. [83.35.57.188]) by smtp.gmail.com with ESMTPSA id q1-20020a05600c040100b003c4ecff4e25sm5419229wmb.9.2022.10.30.10.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 10:52:10 -0700 (PDT) From: Angel Iglesias <ang.iglesiasg@gmail.com> To: linux-iio@vger.kernel.org Cc: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, =?utf-8?q?Nuno_S=C3=A1?= <noname.nuno@gmail.com>, Jonathan Cameron <jic23@kernel.org>, Angel Iglesias <ang.iglesiasg@gmail.com>, Wolfram Sang <wsa@kernel.org>, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/2] i2c: core: Introduce i2c_client_get_device_id helper Date: Sun, 30 Oct 2022 18:51:06 +0100 Message-Id: <cover.1667151588.git.ang.iglesiasg@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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_NONE,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748136187498117942?= X-GMAIL-MSGID: =?utf-8?q?1748136187498117942?= |
Series |
i2c: core: Introduce i2c_client_get_device_id helper
|
|
Message
Angel Iglesias
Oct. 30, 2022, 5:51 p.m. UTC
Hello, I don't want to step anyone's work here, so I'm sending this RFC to the devs involved in the original discussion. I read on Uwe Kleine-König's patchset submission thread the necessity for an i2c helper to aid with the migration to the new i2c_driver .probe_new callback. Following the suggestions made there, I wrote this small patchset implementing the suggested helper function and ported the bmp280 IIO i2c probe to the new probe using that helper. Thanks for your time! Angel Original discussion thread for additional context: https://lore.kernel.org/all/20221023132302.911644-11-u.kleine-koenig@pengutronix.de/ Angel Iglesias (2): i2c: core: Introduce i2c_client_get_device_id helper function iio: pressure: bmp280: convert to i2c's .probe_new() drivers/i2c/i2c-core-base.c | 15 +++++++++++++++ drivers/iio/pressure/bmp280-i2c.c | 8 ++++---- include/linux/i2c.h | 1 + 3 files changed, 20 insertions(+), 4 deletions(-) base-commit: c32793afc6976e170f6ab11ca3750fe94fb3454d
Comments
On Sun, Oct 30, 2022 at 06:51:06PM +0100, Angel Iglesias wrote: > Hello, > > I don't want to step anyone's work here, so I'm sending this RFC to the > devs involved in the original discussion. I read on Uwe Kleine-König's > patchset submission thread the necessity for an i2c helper to aid with the > migration to the new i2c_driver .probe_new callback. Following the > suggestions made there, I wrote this small patchset implementing the > suggested helper function and ported the bmp280 IIO i2c probe to the new > probe using that helper. For the entire series (please drop RFC in the next version) Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Thanks for your time! > Angel > > Original discussion thread for additional context: > https://lore.kernel.org/all/20221023132302.911644-11-u.kleine-koenig@pengutronix.de/ > > Angel Iglesias (2): > i2c: core: Introduce i2c_client_get_device_id helper function > iio: pressure: bmp280: convert to i2c's .probe_new() > > drivers/i2c/i2c-core-base.c | 15 +++++++++++++++ > drivers/iio/pressure/bmp280-i2c.c | 8 ++++---- > include/linux/i2c.h | 1 + > 3 files changed, 20 insertions(+), 4 deletions(-) > > > base-commit: c32793afc6976e170f6ab11ca3750fe94fb3454d > -- > 2.38.1 >
On Tue, 1 Nov 2022 16:58:13 +0200 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > On Sun, Oct 30, 2022 at 06:51:06PM +0100, Angel Iglesias wrote: > > Hello, > > > > I don't want to step anyone's work here, so I'm sending this RFC to the > > devs involved in the original discussion. I read on Uwe Kleine-König's > > patchset submission thread the necessity for an i2c helper to aid with the > > migration to the new i2c_driver .probe_new callback. Following the > > suggestions made there, I wrote this small patchset implementing the > > suggested helper function and ported the bmp280 IIO i2c probe to the new > > probe using that helper. > > For the entire series (please drop RFC in the next version) > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> I'm happy to pick up the next version but a question on 'route' in to the kernel. I can do an immutable branch with just the new function call in it if that is useful given I assume this is applicable across a bunch of subsystems? Jonathan > > > Thanks for your time! > > Angel > > > > Original discussion thread for additional context: > > https://lore.kernel.org/all/20221023132302.911644-11-u.kleine-koenig@pengutronix.de/ > > > > Angel Iglesias (2): > > i2c: core: Introduce i2c_client_get_device_id helper function > > iio: pressure: bmp280: convert to i2c's .probe_new() > > > > drivers/i2c/i2c-core-base.c | 15 +++++++++++++++ > > drivers/iio/pressure/bmp280-i2c.c | 8 ++++---- > > include/linux/i2c.h | 1 + > > 3 files changed, 20 insertions(+), 4 deletions(-) > > > > > > base-commit: c32793afc6976e170f6ab11ca3750fe94fb3454d > > -- > > 2.38.1 > > >
> I can do an immutable branch with just the new function call in it if > that is useful given I assume this is applicable across a bunch of subsystems? I'd think I should provide the immutable branch with the new I2C API call. Feels a bit more logical. Will that work for you as well?
On Sat, 5 Nov 2022 22:29:29 +0100 Wolfram Sang <wsa@kernel.org> wrote: > > I can do an immutable branch with just the new function call in it if > > that is useful given I assume this is applicable across a bunch of subsystems? > > I'd think I should provide the immutable branch with the new I2C API > call. Feels a bit more logical. Will that work for you as well? > Absolutely. That's even better - I didn't want to assign you work to do :) Jonathan