Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2310153pxp; Mon, 21 Mar 2022 16:34:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIBX/ZzFWKJfisHaGZ5czpG8dmfuoAnefdPZDp8EuoT4SPlXfWtMC+sEJtWTGkViZWjGe7 X-Received: by 2002:a62:ed0e:0:b0:4fa:11ed:2ad1 with SMTP id u14-20020a62ed0e000000b004fa11ed2ad1mr26508262pfh.34.1647905667171; Mon, 21 Mar 2022 16:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647905667; cv=none; d=google.com; s=arc-20160816; b=iYzaRABjKgxHFzssXIsVT3FPf8JpRismnXIjzzgCUFJpX8eHdYQ/vov2v65XQXf0Fn 5qPVokfeU0/jk5DLaol+sAXNsJy+Co+yQWKgFfhoSKt34v+Hh+WoxrFydiEqjSfew5pg rSX7SaknkctnujjPMj5ipqa7tPPWEa8IQkfKvnbFu/f2dW620z7jjlApFp8lvtfT/OBw BNpYFiLrFI6IOLem11gJElgUa88EfD5UR4+t660557xD2u2OsbMoBm5E7VgaZjtt8vf5 01RK6QRvBPFAWs1kpGnz7kz+OWu6U8JRvDmnwXWFljrB4+lP/DIhsVHevlhVqlSFOTQ6 HpwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=mUKC2d+rgbadrMqKVzRP63ji1CbU8Dtk3LjZqErXfOE=; b=qX6lu6h3zr9vczOF5DtHCYQkHI7zm2YRrKIze9drYrILi5ubc/346WNUzC9rv0Rftx NJaDXuOh4zBTtBb/52VcHWlHaLSnHAfVAeyvEvxig1bEmWyFB/do0/umD69EZpcVLy+G Da3j6cDdySQdQmvsqraTnLrvsbSycR6mWkmC9h1jQlk9HbFV6sWO5yEEvrDogBJe+LxY RzY14TUkiNERnICbF5HrURFsCnjVzyMpr+3er4eByc2jfTNNnxn4RZXosSfHNH7yzyfI e4/JM7QuEx6aJ0UMGiZP1e8ewkn39bYpvMjqn/0e04s+513oQtqHvDhSkdzYwKCQt/mA TEpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M1cz0oNp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id fs12-20020a17090af28c00b001c68967d8f1si638633pjb.80.2022.03.21.16.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 16:34:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M1cz0oNp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 51E633612FC; Mon, 21 Mar 2022 15:25:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230349AbiCUVWa (ORCPT + 99 others); Mon, 21 Mar 2022 17:22:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbiCUVWZ (ORCPT ); Mon, 21 Mar 2022 17:22:25 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41BAA1AAFCC; Mon, 21 Mar 2022 14:20:18 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id mj15-20020a17090b368f00b001c637aa358eso592115pjb.0; Mon, 21 Mar 2022 14:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mUKC2d+rgbadrMqKVzRP63ji1CbU8Dtk3LjZqErXfOE=; b=M1cz0oNp0VZNd+EWrU5eo3Q9CNpBY6GlvjuOPjo7UNwwLLiok+jLmS1d/4hoTj9MHm ql25H9sfRQ0n6q2e7wgqPMNlcr8T4Ra3okSeFY8ezPCqAcLO+9sSkslmQDRDAggYzRhj gdsu45gccbRrFNc6/4mGVBGNKlWK0vdVbANxZpbEqQKfSAtkmB9cKHQpuMJQ4uERAWs/ sH480/8jecHqQX5ikXdo+NC/BEQ4z1k3OrFpTLCXMMaDyc1V59TnkXgHfJ9eELnUmxUn 7PQ73ETbMrhi0IM9DiyeDi8UdpRwEYehpaywLb6kFSWGLqWk3YW2+LWpS3zP+bc+93yL eFeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mUKC2d+rgbadrMqKVzRP63ji1CbU8Dtk3LjZqErXfOE=; b=2NNpSFN54I3nJnzmaPWgzFLiFM68e+nvwcGeGl0TWc4YeP1nn6OHmLXDGh+A+AMDvA TyiN0BEWVUQpPHeo1QLAnro7o+97X6sUFUEdbduPV1ZC+bnnSc3MkSnDX9BqpKBkSgk+ bUCmC01MkhhxDZrLMbz4apaCVP/7xrx/aQzyFb/mwiuS2JzW5FUELchfGLV7yaH1jxVw OJGXv0D1Ng1IxsIgM40GArbAfX+pzLIEeyPmN2l19p5mrtbrNXq81l7eAz9PtZUOWTOc OC08o7rkCsdZ915S1Fdo+g4Jm7/Y1jFZtN9BvWms9Q8OnVVYi4gVZaxlkZ7812q9PWy5 eqfA== X-Gm-Message-State: AOAM5305Ej4WVyBsB/FRau3uxemW/+X4OgQubHvZuSMy1uGvXoSsIZ/W AeD+u7H8GxIIjJWTHKbNj+ovomAQww8PvxoB X-Received: by 2002:a17:902:d48a:b0:154:7a1b:5f2b with SMTP id c10-20020a170902d48a00b001547a1b5f2bmr2327169plg.52.1647897617648; Mon, 21 Mar 2022 14:20:17 -0700 (PDT) Received: from jagath-PC ([115.99.184.169]) by smtp.gmail.com with ESMTPSA id m11-20020a056a00080b00b004f791d0115esm22307990pfk.171.2022.03.21.14.20.15 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Mar 2022 14:20:17 -0700 (PDT) Date: Tue, 22 Mar 2022 02:50:13 +0530 From: Jagath Jog J To: Andy Shevchenko Cc: Dan Robertson , Jonathan Cameron , linux-iio , Linux Kernel Mailing List Subject: Re: [PATCH v1 1/5] iio: accel: bma400: conversion to device-managed function Message-ID: <20220321212012.GB10058@jagath-PC> References: <20220319181023.8090-1-jagathjog1996@gmail.com> <20220319181023.8090-2-jagathjog1996@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hello Andy, On Mon, Mar 21, 2022 at 10:30:26AM +0200, Andy Shevchenko wrote: > On Sat, Mar 19, 2022 at 8:10 PM Jagath Jog J wrote: > > > > This is a conversion to device-managed by using devm_iio_device_register > > inside probe function, now disabling the regulator and putting bma400 to > > power down via a devm_add_action_or_reset() hook. > > > > The dev_set_drvdata() call, bma400_remove() function and hooks in the I2C > > and SPI driver struct is removed as devm_iio_device_register function is > > used to automatically unregister on driver detach. > > ... > > > +static void bma400_disable(void *data_ptr) > > +{ > > + struct bma400_data *data = data_ptr; > > + int ret; > > > + ret = bma400_set_power_mode(data, POWER_MODE_SLEEP); > > + if (ret) > > + dev_warn(data->dev, "Failed to put device into sleep mode (%pe)\n", > > + ERR_PTR(ret)); > > By what reason did you remove mutex around this call? > > > + regulator_bulk_disable(ARRAY_SIZE(data->regulators), data->regulators); > > +} Sorry my mistake, I missed this. I will include the mutex calls in next patch version. > > > > -- > With Best Regards, > Andy Shevchenko