From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F9E7C001B0 for ; Thu, 10 Aug 2023 08:56:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232117AbjHJI4a (ORCPT ); Thu, 10 Aug 2023 04:56:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231596AbjHJI43 (ORCPT ); Thu, 10 Aug 2023 04:56:29 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A6172103 for ; Thu, 10 Aug 2023 01:56:29 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-583d702129cso8652427b3.3 for ; Thu, 10 Aug 2023 01:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691657788; x=1692262588; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Y4xzhtgK2ZzvOYUDyqNSbtvklnaYEVyirCJgKwWKjKc=; b=r96+eZWbRyq6nfaVV7VksEHYdO4rbmkXKvs1TzZmcvoJqoo9rzhy4biR7Cah7jgdOo od5JiHxyra3MzW6c03d8sWhGe5I5u9R+IkSr1ce55lrsx+q8bMVHQWt5wLtep/NMzr6q Cf3sGJVKXJ63hdOBtPNTk3tgDtZV+R9rtq70IVXjIDDtDwWLfdU2cp/zdWJf6c+RVETx xvH2vUGFpmVLpLSmXb6LU2IE10mD16h5o06cfRo+a6VkiJfxI+f9GXy5mU1LbN1aIC4j DUgWbFv1QgGDsQdHXi7fsnjDH3JTojWshdIURjrDWHaKkyLuDH+WS1iLfXTR6qdSpIbk 4lfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691657788; x=1692262588; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y4xzhtgK2ZzvOYUDyqNSbtvklnaYEVyirCJgKwWKjKc=; b=G3RmNwZIKIXB8sWI5znObj4UCwHv1Jp9G2VOKqNxtYm/6cz6uMbZgmwmJmN7UvM5X5 qbzeulZpR0n/ytkX1L7N7K6f8D8KglK/nWrsPkC03PiiqQsTVBMg8UvMrdVlbiqQwmQI zVOvK9B7H4u3dQ4Wh5eDP1XJT/IbxTpHHE70XToLzwhKOmg7pxfqgJnRfAqEVQnPXqZ+ k1WrXg+RYaUuWv3bNvW0vx0FB7lDWxR0GgCjdptRrkOuKjKocmvOJ8bKZaC4BcK/a6x9 JEDUBsC/NpqGXJt9LixbTGabxDoBNRbn1rah42bMSkyUnBo2LkQ+k2mTxIM/Pu9O3buN amTA== X-Gm-Message-State: AOJu0YyWUpXC/gm3mARgdEpid9J8oYhMvqHoWmihtCvHDNWmbX/7BfXe zsSEPjhXRxT0MIp4ZEoNxtZdfLM2cnwrulKCH9irWg== X-Google-Smtp-Source: AGHT+IHLVKgLS+yA12n4e4oVR00qirPsOIQHxKivvEYUO3GDX4h6o1R1JjXDTABXln2G48Ua37dLjT4kf/I4MTOSdhU= X-Received: by 2002:a25:76d0:0:b0:cef:e2c4:d366 with SMTP id r199-20020a2576d0000000b00cefe2c4d366mr2018376ybc.48.1691657788682; Thu, 10 Aug 2023 01:56:28 -0700 (PDT) MIME-Version: 1.0 References: <20220524075448.140238-1-linus.walleij@linaro.org> <20230809134337.28224-1-bavishimithil@gmail.com> In-Reply-To: <20230809134337.28224-1-bavishimithil@gmail.com> From: Linus Walleij Date: Thu, 10 Aug 2023 10:56:17 +0200 Message-ID: Subject: Re: [PATCH] iio: afe: rescale: Fix logic bug To: Mighty Cc: jic23@kernel.org, lars@metafoo.de, liambeguin@gmail.com, linux-iio@vger.kernel.org, peda@axentia.se, stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Wed, Aug 9, 2023 at 3:48=E2=80=AFPM Mighty wro= te: > > The current code "mostly works" because we have not run into > > systems supporting only raw but not scale or only scale but not > > raw, and I doubt there are few using the rescaler on anything > > such, but let's fix the logic. > > This does break the logic for twl6030/6032 boards as the seem to > only have only raw and processed masks[1]. What would a probable > solution for it be, to modify the twl gpadc to include scale+raw or just > revert back to the OR? > > [1] https://github.com/torvalds/linux/blob/master/drivers/iio/adc/twl6030= -gpadc.c#L808-L840 How does it break it? It's a change to the AFE rescaler driver so it can't really "break" twl6030-gpadc. Isn't the complete picture involving some device tree using the prescaler etc? Can you try to dig out that so we can see the whole situation? Yours, Linus Walleij