Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1700889pxb; Fri, 27 Aug 2021 15:34:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzahPc00IPzHUB/PpOzRVPmIyGYWhigkoBPOwxMKYFewObKLbZp7zFGgipjwRJtQekD+zAW X-Received: by 2002:a17:906:5d6:: with SMTP id t22mr12186134ejt.98.1630103690226; Fri, 27 Aug 2021 15:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630103690; cv=none; d=google.com; s=arc-20160816; b=CsWcIvEavrRzuTgibvesNjc4TTM4bTl0f0dw9focuLarz746NfR3AHmXWoA1TK7Eim O8D6KxMzGRE/lbiSY6r4QqcyfkaaE8BETv6l8HV5y+zf7K5MSz/5FhfncgYNq2LUI4xt Zp0dYmHdCZ4TkC+9z2wbEnnE4yBA5VMA6VvcDaLC7kuRF9CR7MllWP6mT1toM97cBHU9 fG/BeX/CDXNF21TNhQgC/dD82yOCoAq2Imo3TLTgLtprzLjzwHykTe8zt7P4+w9rP0fc rJB7Hh8bynbAF1Qlk0a3eJVCYj72Et2JDTQiGsadKXFvdkMgmyMupD7imc/M9cL5UsBg BeKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=X+9FDw9/QHU2Wo0eFuG7huo1QGMU+3uWfi8hED0MPa4=; b=tQfOQdgmlDVAdtr3o6t8KxpQkWoFxzt60ovIeJmHXBhoRMEgJQvhhrwMi+6yy4L9Jo m1QES/nEZldMRh2KuufiwgoquTHhxDhJdyeW9oCg64tbQPLecQXqLCv7LQztzStSiQI6 ME2cNhAEsv1INoBKu7MQhbxd4nKCxMDpTM9MufVJXMH5/JjWtN1ORo6UCNp+2J2S6w73 oS+FU7fqnFiV0AUklvvCjVfz8n0K5xYfk1i/oPorNrhdwr3b+sMpQNMR2wR2N91ySCPt LzXlpfjq6NdZBWQ7pRmYDuVjTAjMr3R5assVy8aMCkADENgUqX9ccXun8fiJcy7d45en 0uew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qo0VtEQt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si7690264eju.305.2021.08.27.15.34.19; Fri, 27 Aug 2021 15:34:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qo0VtEQt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232211AbhH0Wdj (ORCPT + 99 others); Fri, 27 Aug 2021 18:33:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232216AbhH0Wdi (ORCPT ); Fri, 27 Aug 2021 18:33:38 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA3B7C061796 for ; Fri, 27 Aug 2021 15:32:48 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id i28so13997864ljm.7 for ; Fri, 27 Aug 2021 15:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X+9FDw9/QHU2Wo0eFuG7huo1QGMU+3uWfi8hED0MPa4=; b=Qo0VtEQt9lZ/c4e4HiAlFNwq9xr+tQMoyt3Wt7RQdgGwL6HgKUf67dATllg2noTt43 ebC3SuIY1bxw7zwtpsh0PwaKUvUNKNrS1E1lcuTZih1hnrP9JNGmh9U1oWei2OKqIYFS ThVca1wMlnWwYP8VcFrWdXuS1iaPSbx6mtmD56wsTVuH8qmUo65InU8ka+YolKM3eSEO Apv02vDyTjmJDoKoJVMR792nF69SeO2wJj7g+/twoAfIf8PmoGQCujgvOOjTo5xijnxv TlL9dvx7wo4NwuhnJutyvv3B2ttUKY3nVbAczzV5SjgPWNxj0BMVu507Bu9dkLTN9fEb h1SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X+9FDw9/QHU2Wo0eFuG7huo1QGMU+3uWfi8hED0MPa4=; b=dMy2zkrmE7IyIeJM6UoyPo+e9HDI1eoyxyiBTWryaEfu7tFro30Qia0meS/9L1rYeL rA+sPKZsNCQq17ZaTEkYZE53h6WuJv/V38hQCCWAD4WwvC6S1Sz8lwLcQhRlG10YbsU7 AQYlQZp3eE2dfjlrpcWzMdzFyFLwc49Wp3wGu0FJ+Hi2Nnf6CEsQIyKYy9YPDlAt1HDo Um5cb8y/P+oJosezbWUEjsWBzgmB7Olouj95IKfT7/v3d+EYMqX88l+VqSpxd7uNWmu6 Cukib8TZ7k0jOFZCfvNKj31OEf6Mc2gNbpEntP5/k4D0xik97rpPURzDiUi6UufaBh8E 24Zw== X-Gm-Message-State: AOAM533Yqmwu/cR05SEFTCE0optwNsV6Hb5/oig7tqK7qegmWS7kp6Di sjqKrItEOIyz7Ny3FthEXJPxwCRY5pwjT73B1wf6DA== X-Received: by 2002:a05:651c:4c7:: with SMTP id e7mr4392319lji.438.1630103567258; Fri, 27 Aug 2021 15:32:47 -0700 (PDT) MIME-Version: 1.0 References: <20210823112204.243255-1-aardelean@deviqon.com> <20210823112204.243255-4-aardelean@deviqon.com> In-Reply-To: <20210823112204.243255-4-aardelean@deviqon.com> From: Linus Walleij Date: Sat, 28 Aug 2021 00:32:36 +0200 Message-ID: Subject: Re: [PATCH v3 3/5] iio: st_sensors: remove st_sensors_power_disable() function To: Alexandru Ardelean Cc: linux-iio , linux-kernel , Denis CIOCCA , Jonathan Cameron , Lee Jones , Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 23, 2021 at 1:22 PM Alexandru Ardelean wrote: > This change converts the st_sensors_power_enable() function to use > devm_add_action_or_reset() handlers to register regulator_disable hooks for > when the drivers get unloaded. > > The parent device of the IIO device object is used. This is based on the > assumption that all other devm_ calls in the ST sensors use this reference. > > This makes the st_sensors_power_disable() un-needed. > Removing this also changes unload order a bit, as all ST drivers would call > st_sensors_power_disable() first and iio_device_unregister() after that. > > Reviewed-by: Andy Shevchenko > Signed-off-by: Alexandru Ardelean Reviewed-by: Linus Walleij We should at some point add proper runtime PM to the ST sensors (cf drivers/iio/gyro/mpu3050-core.c) but that can certainly be built on top of this patch. Yours, Linus Walleij