Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2183546pxu; Sun, 6 Dec 2020 22:46:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4AIGfdynyvHQSAxwNY7JwdFgLFEyJmpmQOmZjwzCRa+jtbxSKElheCVYLlBADpruJ3wwJ X-Received: by 2002:a17:906:9588:: with SMTP id r8mr17236359ejx.148.1607323611933; Sun, 06 Dec 2020 22:46:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607323611; cv=none; d=google.com; s=arc-20160816; b=FdTy0AduY5kTFoGxUfG0QpA12/vsdhYxXZKN0yAs5RfitAoKz4CLQWm33kAFAtlQKm Zf/6on4IBGoeBR8iloi3YOSIlbu/7FtK8Ks1nU7Y5VvQ2kDJGJbmH3DZRdyG/cT15I37 VRIlRvXyCJTPq1GQ6M4Fg144ZOqAd9PWQTMjxDATpKpruJDfpwu2TeNcyy1FDeiJuHRM 84enI9gO3T33Do66DVo1+1bBVJQR4wriQngVLhD3oAouvUzJX5JSMG3c1W6pOiEE+Xxv TZrpbciU+LQ/tGAG2xZTE4kiC92hfPpuWtNlRa48lnIjW6TeqtO/0g12Na/juia9AHIr tcyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qx6YS0mIUJ0wDKcdijGuZVewPoru0FmkFXCzv4uYK/g=; b=wRz1YuncuM31VseaIfF34+a36MK2L75wiQ3TE5qmBgAurCHYoYYyn2AxMso+sdbKnZ zR1+A9EsxUjaaTEPuQC3pLFrUobO9CQdRX9XRkzioooViax9T5t085kwWPBG17civP1N D0GfiQ+3mosFc6JyUsiGFgZSZFd7yFR4+WV2qHnWG+HlDUp4WrG9yAhtgB1fR7DoXAjt GaZqYFF7hwnB3q3+Reyi4yqS/dnu6uSoKcIQs8sGB99Ui3fEV1/2bgAqFEb/pQmA4RKo RZXwa5PxyhxLyV1qPbhzXogMyScMSq57bnj+7AHJc3ypixTv13DUM9eRjOhkGt63Fp2T fJcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="J7wb/1h6"; 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 n18si4968201ejr.448.2020.12.06.22.46.29; Sun, 06 Dec 2020 22:46:51 -0800 (PST) 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="J7wb/1h6"; 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 S1725888AbgLGGoJ (ORCPT + 99 others); Mon, 7 Dec 2020 01:44:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725681AbgLGGoJ (ORCPT ); Mon, 7 Dec 2020 01:44:09 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D623DC0613D0; Sun, 6 Dec 2020 22:43:28 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id 131so8813039pfb.9; Sun, 06 Dec 2020 22:43:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qx6YS0mIUJ0wDKcdijGuZVewPoru0FmkFXCzv4uYK/g=; b=J7wb/1h6//TSJi0L/gu18/CgEVvCUfSkTdW5Ipbn8Y6cWVwAFTF1GRNT2twJQGQbbI rSNrn3BtOD3OXSASTN4MCwacCP0gUzOB99CczYylJ/nqYy9fAa9096Emald2D42mcSaI pHwyR0spaBY7/l1HpEBCbtRIJQkdVki50CjdX66b5H355r9pi4CppcdPrv9VGWm7PLdh PqOwV2GNvrPSGXSXV82WwUPvJgk4ENt7Vjb3BCsKONfsT/TX7tWFWSPO6TDW9CYIfMXy kf0owEWMkFMoL7ULWGcAvJ8DOer7oz+S9j2XgMq7BSrxzzQ87A38yZNHK2B8/MCGoxfL 4pkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qx6YS0mIUJ0wDKcdijGuZVewPoru0FmkFXCzv4uYK/g=; b=aDrmbEjiMbkh73mr4XqxEy8uP9m3VLStdP6BFQtdz1SnsdMtrlbMyDJ+N5eQA0GgDJ UaEr8tyFdphkDbx/syDphCATf2ZAh5s1KsNJBCRwfTRD4z1OAwTHdRPsbARaT6dm44Kw qWEs4pjHU5z5l7cHQCYVce04Af9/Yhq8uCnSDwuBDL7uNE8KAkeXSrX6Xt6OiKAbcaDP pyReRFuvVDbQJ0riX+M8QTfP+5/mDxUXWzHs5nS/F+fTTTy4lMGLxIXjhWaZjz3mn4lP x5LU5zaGu9edBG3qp90xEH6W9+smt8fk+z/BfmyO21pe3HyrMxfNIIIb2FbC+e7JjJmL NQ4w== X-Gm-Message-State: AOAM530g6ALe+k6pudCTh9Vsa6z91NpbCp6KhL4y+Tzxd6OcI0/gpckW cQoxHhrtmNFbPyXz1nngecdRJRpFtTk= X-Received: by 2002:a17:902:c395:b029:da:9aca:c972 with SMTP id g21-20020a170902c395b02900da9acac972mr14694983plg.32.1607323408407; Sun, 06 Dec 2020 22:43:28 -0800 (PST) Received: from google.com ([2620:15c:202:201:a6ae:11ff:fe11:fcc3]) by smtp.gmail.com with ESMTPSA id z7sm2596426pgz.43.2020.12.06.22.43.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2020 22:43:27 -0800 (PST) Date: Sun, 6 Dec 2020 22:43:24 -0800 From: Dmitry Torokhov To: kholk11@gmail.com Cc: robh+dt@kernel.org, rydberg@bitmath.org, priv.luk@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, marijns95@gmail.com, konradybcio@gmail.com, martin.botka1@gmail.com, phone-devel@vger.kernel.org, devicetree@vger.kernel.org, krzk@kernel.org, andy.shevchenko@gmail.com Subject: Re: [PATCH v9 2/3] Input: Add Novatek NT36xxx touchscreen driver Message-ID: References: <20201028221302.66583-1-kholk11@gmail.com> <20201028221302.66583-3-kholk11@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201028221302.66583-3-kholk11@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi AngeloGioacchino, On Wed, Oct 28, 2020 at 11:13:01PM +0100, kholk11@gmail.com wrote: > +/** > + * nt36xxx_set_page - Set page number for read/write > + * @ts: Main driver structure > + * > + * Return: Always zero for success, negative number for error > + */ > +static int nt36xxx_set_page(struct nt36xxx_i2c *ts, u32 pageaddr) > +{ > + u32 data = cpu_to_be32(pageaddr) >> 8; > + int ret; > + > + ret = regmap_noinc_write(ts->fw_regmap, NT36XXX_CMD_SET_PAGE, > + &data, sizeof(data)); > + if (ret) > + return ret; > + > + usleep_range(100, 200); > + return ret; > +} Regmap is supposed to handle paged access for you as long as you set it up for paged access. Why do you need custom page handling here? Thanks. -- Dmitry