Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp40989pxb; Wed, 29 Sep 2021 20:31:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1VwcDcmZFhqdCl2+53RrAZatyn8j1kCggVl44jJh2NLVUN9JSbeK3LX9IXF24EI1+iFMQ X-Received: by 2002:a50:d88a:: with SMTP id p10mr4372200edj.274.1632972713201; Wed, 29 Sep 2021 20:31:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632972713; cv=none; d=google.com; s=arc-20160816; b=Hf4Zhk4b/jKfHaaG9uCno5bfiM0zSA7Pa3B4tPYSxBZVUOjtRENnvZjjetAlJbZyI4 OocavEaNm7M9qsr1jvKJoirf9imX7QhNGdQ09ICKWSl6Ye8K2AfCtAhmyVCFFaa3oNXi eFdGtmlr404wn2k9iuK+rkhR8Ei3ZZ9WM1/JWDceX/nyxi58DKovYAlrmpYn9j6UDRt+ QHIPJU3b3esS23+UtFrqeWEfZrMWrS8jadeGGJlMN5b/IcvPSyY3+bOhKFArkPr2VNE1 dbSJC5ITpG13rVbC3mcxnuS8I6O9TCAA71sBOFpOYpuJ3E8x5OjSu2tXrHi/rCOElRZC D7YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sDTL0yxYT47N+0jjLEyGdD4ZajCQhNx8OZO23Bvom6A=; b=Hy7rZguN3PUoOjdUe/+v7THYyX1zMyvk+gSAW0c1m70n/fQP0fl2t38pDw5QT7nLRk Iu/KOZ9+vIGewZnibcKE+E0nXuouAsvCwBj34WWC0VxvlpqLe/7iCRPieurO3lLxhlwz rrWvJHiQVb5rnmCsdG3cnRLwG8r8WxM+wCCplNTe09Tk4CZNJwK9JzMunxVkmQMoUrde F9UdiZHAhHjnArc9C0T6RoHbt+Sw2/842n9qirgn+L10ge8fhiXZ52wL9CKalZNNnm3t DscszIezxlQKKP69/WkCqrQmPNakhb4nl7LSS0XXs7D7hT75FzfDsGQ61eTrV/ujDbE6 X3AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JmtbCmQr; 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 f4si2174409ejl.218.2021.09.29.20.31.29; Wed, 29 Sep 2021 20:31:53 -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=JmtbCmQr; 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 S1347936AbhI3DHo (ORCPT + 99 others); Wed, 29 Sep 2021 23:07:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347926AbhI3DHm (ORCPT ); Wed, 29 Sep 2021 23:07:42 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5851BC06176C for ; Wed, 29 Sep 2021 20:06:00 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id t189so5540219oie.7 for ; Wed, 29 Sep 2021 20:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sDTL0yxYT47N+0jjLEyGdD4ZajCQhNx8OZO23Bvom6A=; b=JmtbCmQrhYNDXZGRKfkIH0HRRStQuRwld6nSinEj6CMvOBT4R7SgwLdKRm7MQ+s5hk BHJ95SI6qznWSrrLE1GzHC4e7e0ElMKW+mFYfeg9+lqVuTTL9px+5xg+Je2MfUKFe+rO hUUcAJp6z370gj87PvvaOgH1Sii++lIJX60jgIUbq4PWXabEz7/XWF2H1eCKnojX4gdi KbWjuN0EJ60lQ+k5Cd7A8pR4F1fL9Ogu6x7MNC6htOvwrWwyZ4G6XDZPOsib/Wb1o+XA zo3xDDQIPPOyYITYmiqW8yi3U6JIv4FpdStnk3n8v7g87QRSymRD21DIhyvuMcK6ghPN C43Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sDTL0yxYT47N+0jjLEyGdD4ZajCQhNx8OZO23Bvom6A=; b=4m8mZzZI7D2BHMwnm5p9hMl0uE+da8YUn+lXE8p5XFXIC5Tsl+uEklZZ1FYUVUH0G1 KIGhRzXN5DHDoVBjT419kLjU6H7lj4BebC0N4Erx6Wmjo5INUmH8RPLkRW6meh5QGsfs HUv5FoxFhMonTAN9CXC33fq67s2Klnb6TNaJF7233KJCPhbIKTpjqCjb0WrqXUGTtQ/b owKxX3TN84efSiK6XFOfhEEQm5suqLRvZPRqItozmcBJWqt8Gj6xtkvRpNshZa9XR91Y n9MuIqjBK6vx9kq4UuRqZC/nG6wcLKTiRaeelzT71hbrRqi5rT1cEuShFTbNrdP5Qa/N KsjQ== X-Gm-Message-State: AOAM533B6fIKU3lPu3OhBYpnWDf7PKHmJhUtCB/cMu88/yvZmgTxidey /XDvA8CEg1al7RWbad3frfLn7w== X-Received: by 2002:a54:4f1d:: with SMTP id e29mr880677oiy.179.1632971159696; Wed, 29 Sep 2021 20:05:59 -0700 (PDT) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id s16sm323358otq.78.2021.09.29.20.05.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 20:05:59 -0700 (PDT) From: Bjorn Andersson To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Lee Jones Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-arm-msm@vger.kernel.org, Doug Anderson Subject: [PATCH v6 2/3] drm/bridge: ti-sn65dsi86: Use regmap_bulk_write API Date: Wed, 29 Sep 2021 22:05:56 -0500 Message-Id: <20210930030557.1426-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210930030557.1426-1-bjorn.andersson@linaro.org> References: <20210930030557.1426-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The multi-register u16 write operation can use regmap_bulk_write() instead of two separate regmap_write() calls. It's uncertain if this has any effect on the actual updates of the underlying registers, but this at least gives the hardware the opportunity and saves us one transation on the bus. Signed-off-by: Bjorn Andersson --- Changes since v5: - Extracted this hunk from patch 3. drivers/gpu/drm/bridge/ti-sn65dsi86.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 41d48a393e7f..412fb6f564ea 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -193,8 +193,9 @@ static const struct regmap_config ti_sn65dsi86_regmap_config = { static void ti_sn65dsi86_write_u16(struct ti_sn65dsi86 *pdata, unsigned int reg, u16 val) { - regmap_write(pdata->regmap, reg, val & 0xFF); - regmap_write(pdata->regmap, reg + 1, val >> 8); + u8 buf[2] = { val & 0xff, val >> 8 }; + + regmap_bulk_write(pdata->regmap, reg, buf, ARRAY_SIZE(buf)); } static u32 ti_sn_bridge_get_dsi_freq(struct ti_sn65dsi86 *pdata) -- 2.32.0