Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp378654ybr; Fri, 22 May 2020 08:45:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyqblMAv1JYyeNmEdlm34oLZ5tyhLmeffgmLSHMRgU9C9nRDnWsGZ+8mwFiEA+NoLkoSjC X-Received: by 2002:a17:906:a415:: with SMTP id l21mr9141301ejz.100.1590162303160; Fri, 22 May 2020 08:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590162303; cv=none; d=google.com; s=arc-20160816; b=HHdZ8DBd0uGj72h9Nr0GveXi5IU7fWxwa+DiDWhJiLX5Bebda5ATXI+i3FiOx7dSbA s29hET3QJR7AZG0TapWk3nCthorl7OTf6f7XbRVnD7lu+bg1FiYX0D++r6wrhcDmR/v4 85TU1eH/Mvtx2ahkU9+tVSfHH28NJs/8SCY/aGEt+yiYz176WkTpm8/fCwHNnksU8Y8R mZ9pzYlRj8z7viMXxiS7PnFi0VjPxUHtVqYlJI+uR3dRVGB3qG7h8J/hCplYd3JcM7yL mT5B07aoxLihG9LltPNKpxg/qx15R27tBvt5IJaWCyPihi5Ng/ua+0FDvTTrNrTDH/jR PaQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=SkeVeEmTaIjxtOxUWFezjp2IkJ1MY8WBHQ8sSrPjR8g=; b=tZoeguIGRSaluZHb0auWt/FD0H+rOCjRNvPfizcsbwIzy0TpmXAQCDisaB5aJnyZqJ OT7t2d5EZeeOTssDOm+eARxkpcFBt7L/r6LW8JuGn+7syTpMBqA9B3f0eZZvzhzoTcI7 vOEIKYY87TJpg2tzq8qwZohgG+N5zNJZTh7NL2UA+kKhc/i2Vnigx6GRdyXR1bMuHJjI nhBO3zQQXWC3vWAHq6GClBWPoTL9jpIIZU7bHwiF323bI2xMDflUH+ZxdMw1hlUWllQH pI8eSV+wzvr6NlOZBYUsOHRiC9aDKEcz0eYnisFYs/ByEhFnAkv8ZY+A4h5Rj+RdWvcO 4Usw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HYUOUocO; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si5199027ejd.527.2020.05.22.08.44.41; Fri, 22 May 2020 08:45:03 -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=@gmail.com header.s=20161025 header.b=HYUOUocO; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730562AbgEVPlR (ORCPT + 99 others); Fri, 22 May 2020 11:41:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730393AbgEVPlQ (ORCPT ); Fri, 22 May 2020 11:41:16 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27567C061A0E; Fri, 22 May 2020 08:41:16 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id e11so4403130pfn.3; Fri, 22 May 2020 08:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SkeVeEmTaIjxtOxUWFezjp2IkJ1MY8WBHQ8sSrPjR8g=; b=HYUOUocOBHB8kAf7NZwqO8nrAIOrnuMHJZwpK5m7aC9RrHGNjP6CftTCecVIjBErpr TbYsin/LsUEUZId3ViDg556fbFF2SxbBAqtK7gBIivTR9zJ9SanrtHxRwvuYI+zeWK1g 4RJj3TWGwhIU/qEsYCt1eBUonliqYlWk5cz2AFWCXmKgJJiWKyYrEzwfZGyf2cRwy/2A bDn2W1liPSFTH9UZGgnqds1H86Fw6NEVN3uXEIxhNjXS8TdnsVM2dgL0b2TENMuyKxBp k4Qnr9obs6ZnEaWBNVAJcJSzw5EqSaKbFdGS4AUUd0915M0ycd/z2Ng1Sl3NY+11uXpb 3neQ== 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=SkeVeEmTaIjxtOxUWFezjp2IkJ1MY8WBHQ8sSrPjR8g=; b=W0f7aW0TIUgAGTkyHcdUk9Icw80/lqFJct1/MXeaOLglaYw+BnETtrPrD/KqynjbZD 71byfvaR/0IXE+BfFopUsrKRGcmRXOkOhEoD861t8L1cTd3FirN8xWOlRBSkTk/c8hQZ odeAaiF/ZNtvWOCakV/Ni/4GI26nFWGmxfwJZDJNV0N2QSFHUARfmJvG2AmM/gZVke9w EvvrhlcQ2Cu4AFKfHnhpmnFpURwXBxki9i21c8rtWEf4wfQI/mgfeWxi5KLi+yL2yDna XjbYm/i57Fn2w7SPvA//zhU9WMcF/pqjxPibjolCMRlHepbSUmVPHcx2ab6cRFoD/Vss lTIQ== X-Gm-Message-State: AOAM5331lGc8Nz0mCjh6kO1a2nssMA1gKd110WVvNM30Fs7riGIfHJLK EWA1xApBcDuu7cWAubnPZARBej1f7MGV6kQkLGE= X-Received: by 2002:a63:1d4:: with SMTP id 203mr13726609pgb.74.1590162075719; Fri, 22 May 2020 08:41:15 -0700 (PDT) MIME-Version: 1.0 References: <1590157452-27179-1-git-send-email-jprakash@codeaurora.org> <1590157452-27179-6-git-send-email-jprakash@codeaurora.org> In-Reply-To: <1590157452-27179-6-git-send-email-jprakash@codeaurora.org> From: Andy Shevchenko Date: Fri, 22 May 2020 18:41:04 +0300 Message-ID: Subject: Re: [PATCH V5 5/5] iio: adc: Clean up ADC code common to PMIC5 and PMIC7 To: Jishnu Prakash Cc: agross@kernel.org, Bjorn Andersson , devicetree , Linux Kernel Mailing List , Matthias Kaehlcke , Linus Walleij , Jonathan Cameron , Amit Kucheria , smohanad@codeaurora.org, kgunda@codeaurora.org, aghayal@codeaurora.org, Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-arm-msm@vger.kernel.org, linux-iio , linux-arm-msm-owner@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 22, 2020 at 5:25 PM Jishnu Prakash wrote: > > This commit includes the following changes: > > Add a common function used for read_raw callback for both PMIC5 > and PMIC7 ADCs. > > Add exit function for ADC. > > Add info_property under adc_data to more efficiently distinguish > PMIC5 and PMIC7 ADCs. ... > - if (of_device_is_compatible(node, "qcom,spmi-adc7")) > - indio_dev->info = &adc7_info; > - else > - indio_dev->info = &adc5_info; > + platform_set_drvdata(pdev, adc); Ping-pong style of series. Can we convert to .info before we introduce above check for compatibility? -- With Best Regards, Andy Shevchenko