Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp176919imi; Wed, 20 Jul 2022 20:34:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tRKzOCpW5/+POvYgEtQh+An+VN1FCsHYG9QUEtHEGKUR4QoDotuO86Go3LJxeOVPqEzDNx X-Received: by 2002:a05:6402:5ca:b0:43b:6e01:482c with SMTP id n10-20020a05640205ca00b0043b6e01482cmr21342955edx.189.1658374485715; Wed, 20 Jul 2022 20:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658374485; cv=none; d=google.com; s=arc-20160816; b=j9oBfWZMkUF89lGbveMqbkscQDpN3XJJqzoz0G+ZExjXwVs13WU0i89toIfcv0zidS WSAPASzxEe4xIbPjES4goJm0Y2Dq5xc1u738m5pLlkSHw8ERKIoy1wSCfPdmXBgzcjEr nNOYeWUFJkd6+Lh6TUFoLvENI1Bp2Des2xzNQvyW+1nr+Vvbi0J2KDzYIJeOLINPVCVj j7byKAL9HNuJsd3Vn2Sdl/bmyZ3fjCeVqahX5Q8U/Zul3o1XPHC5qjuL/rbTZVLR3pLy 6okiRx205ujxAjBMl3XnpjrsEwPmXXX4aaKs/ki9Coq1fdrTbGGFRWXz8Q6YPKpKlx/5 HMDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yp8UseCrak3Uf7ZMCku83+o+h8VdCTPmgbNqPdL/mic=; b=osiZheqzONimgaZsM5mfkDsSHrPpRgsmAFx8J8V/JbqFFkBuhLD/8GCIQMqkgP4YrY Kdkda2cWHqyYDJj7qkqftaG/9t6QBo9VNCx8RTl/rIV3pfHlxC3V6nGaLFgBdb4q5Q6R Yc0AORhiySnsgJ8dzx0SdNogL8yMiz9j1raQ0HpY0tvAQa8TL+6yUp3wvQNPwI3yxlfW wGYysXw5B8Pfst+ENKvcJ4WpqzGQ2FFwzZPTNWQgQnXfO7+DV4zsngM2UTmLprH25+JF 5PfMTQD5j26I0bQ1uFQruugcQuftIBMWPUihcub2GDoEG5J5AnZGkkpccJl5pudoUT+L lOLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CWUDWwoF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l2-20020a056402028200b0043aa4f51a26si898878edv.401.2022.07.20.20.34.20; Wed, 20 Jul 2022 20:34:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CWUDWwoF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231438AbiGUDV2 (ORCPT + 99 others); Wed, 20 Jul 2022 23:21:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiGUDV0 (ORCPT ); Wed, 20 Jul 2022 23:21:26 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1EAB47BA9 for ; Wed, 20 Jul 2022 20:21:25 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id b26so416973wrc.2 for ; Wed, 20 Jul 2022 20:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yp8UseCrak3Uf7ZMCku83+o+h8VdCTPmgbNqPdL/mic=; b=CWUDWwoFiqmSGU594z2yMobPBq5pAqEvzEkfu+LhpngVJg8+AB17WOtYFUaOLL3w/O WZho1Qu5XCZaEiphXiRPHKtYVElMDWAJP16GepKTPRvoGBYykFbFg6t4aRMmgv2wuIdI 3cPqRJ9B5aiYxPIjxulAhMdSjndzkcdd0VaCo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yp8UseCrak3Uf7ZMCku83+o+h8VdCTPmgbNqPdL/mic=; b=4V+n9SKJoSpK6FlnAGthsmnSgr8CyErnSIm9wr1/SXdLWelkiJcTIAMC0DRCUbsVEi rxV0pqyY02gaFfmBo4GUHIGUpeVQsLzgfQjDncXBhCka7StU6cO/omh2f5GT/lJ2ocYZ bpiM+/+i5+vHRB71UExPmaxZe74p1beRfA6hpnfFwZN481oCPvhzBZw14tQG9ZGyU+Eb dhSbNcnTAd00jIePy/65zBDKZelGPnYk+x9mXJU6GIOLqiix5ThSU8nKW1tjn+7Vjzz6 l4tQPBGf6zXm4XYOxSJamj3NpOEoRPReNpfo++5ghlz0CwgIuztpoUtspoj2WlyJZvKg lr3g== X-Gm-Message-State: AJIora/Wdd+gLA9nI2s0v29IIRBTXSxlzCMZTu2weKOmjRIKm3sdrIjT j9rOEX7eEaY36ahF7haA6U+JQBM/XqB3at9/4aZc7A== X-Received: by 2002:a5d:4cce:0:b0:21d:755b:d4f8 with SMTP id c14-20020a5d4cce000000b0021d755bd4f8mr34773870wrt.190.1658373684373; Wed, 20 Jul 2022 20:21:24 -0700 (PDT) MIME-Version: 1.0 References: <20220713031547.11641-1-allen.chen@ite.com.tw> In-Reply-To: From: Pin-yen Lin Date: Thu, 21 Jul 2022 11:21:13 +0800 Message-ID: Subject: Re: [PATCH v2] drm/bridge: it6505: Add i2c api power on check To: Robert Foss Cc: allen , Jau-Chih Tseng , Kenneth Hung , Hermes Wu , Pin-yen Lin , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , "open list:DRM DRIVERS" , open list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Hi Robert, The same patch has been reviewed and applied as 86088f88a25c76baac304b6f887e5da2c30c4e07 in "drm/bridge: it6505: Fixes bugs" series. We accidentally sent this out as an individual patch and forgot to revoke this after sending out the complete series. Sorry about that. Regards, Pin-yen On Tue, Jul 19, 2022 at 11:26 PM Robert Foss wrote: > > On Wed, 13 Jul 2022 at 05:16, allen wrote: > > > > From: allen chen > > > > Use i2c bus to read/write when it6505 power off will occur i2c error. > > Add this check will prevent i2c error when it6505 power off. > > > > Signed-off-by: Pin-Yen Lin > > Signed-off-by: Allen Chen > > Reviewed-by: Robert Foss > > --- > > drivers/gpu/drm/bridge/ite-it6505.c | 12 ++++++++++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c > > index aa5e0aa1af85..cfd2c3275dc5 100644 > > --- a/drivers/gpu/drm/bridge/ite-it6505.c > > +++ b/drivers/gpu/drm/bridge/ite-it6505.c > > @@ -518,6 +518,9 @@ static int it6505_read(struct it6505 *it6505, unsigned int reg_addr) > > int err; > > struct device *dev = &it6505->client->dev; > > > > + if (!it6505->powered) > > + return -ENODEV; > > + > > err = regmap_read(it6505->regmap, reg_addr, &value); > > if (err < 0) { > > dev_err(dev, "read failed reg[0x%x] err: %d", reg_addr, err); > > @@ -533,6 +536,9 @@ static int it6505_write(struct it6505 *it6505, unsigned int reg_addr, > > int err; > > struct device *dev = &it6505->client->dev; > > > > + if (!it6505->powered) > > + return -ENODEV; > > + > > err = regmap_write(it6505->regmap, reg_addr, reg_val); > > > > if (err < 0) { > > @@ -550,6 +556,9 @@ static int it6505_set_bits(struct it6505 *it6505, unsigned int reg, > > int err; > > struct device *dev = &it6505->client->dev; > > > > + if (!it6505->powered) > > + return -ENODEV; > > + > > err = regmap_update_bits(it6505->regmap, reg, mask, value); > > if (err < 0) { > > dev_err(dev, "write reg[0x%x] = 0x%x mask = 0x%x failed err %d", > > @@ -2553,13 +2562,12 @@ static int it6505_poweron(struct it6505 *it6505) > > usleep_range(10000, 20000); > > } > > > > + it6505->powered = true; > > it6505_reset_logic(it6505); > > it6505_int_mask_enable(it6505); > > it6505_init(it6505); > > it6505_lane_off(it6505); > > > > - it6505->powered = true; > > - > > return 0; > > } > > > > -- > > 2.25.1 > > > > This patch no longer applies to the drm-misc-next tree, could you > rebase it and send out a v3?