From patchwork Wed Feb 2 16:06:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 539438 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 1043AC43217 for ; Wed, 2 Feb 2022 16:06:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345743AbiBBQGN (ORCPT ); Wed, 2 Feb 2022 11:06:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345654AbiBBQGL (ORCPT ); Wed, 2 Feb 2022 11:06:11 -0500 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87DBBC06173B for ; Wed, 2 Feb 2022 08:06:11 -0800 (PST) Received: by mail-pl1-x62b.google.com with SMTP id u11so18701891plh.13 for ; Wed, 02 Feb 2022 08:06:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H1kno40kXqd5oHnIK3ylT4ecdPILvrVqPlIbaZeuMIA=; b=eCNIwVf1UszjQp3t8C03ncVpIjOPernL3qKHVwkQsOmZHmZ5zYbbw4HGs6R6qk+yNR 2+M6RnlBh2+Y9CpyHWGAB0+/VD+JS3y0Fv5iCfPNRglL02xg61DMAbTDG/3AMXAwo+Pg bBpCJKzHuH/425GXGj4MSFv8xlc9QVlOj4bIg= 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=H1kno40kXqd5oHnIK3ylT4ecdPILvrVqPlIbaZeuMIA=; b=b7S8L6ni+7jOzuXf5mhmFWOf3OPp/QmojVNA09U76zSUlLyUEtbx+bOzQTGub+8wXo dyL3BFZheAb6nPAl0ZbTqtCHCwgU2GXTn8mrt1ORr/FjICotKe/iCmVi655Y9e6rdwCS qtRoazHkn2kUnAWQ4bpBk1cl3ChQ/H0I9tbUW+lHXzgpJY5r7yjAc6QjPIKx/5ookFKH mkHjTjfsVWQUfm9rvMASg/nAyl2XQRS503ZiG9gRIDr7OuoLRAZhKa5GPh29WcteLbrK zjmmT0d87f/jc+ZBepqhJb9EHb0rj3nFm2QBm9aEggLxNKyfU/kUm/fnKLVZ7YC9NcvM AhHg== X-Gm-Message-State: AOAM532TFy1S//Qdc7caZ6MC2qJfVhmBPjHpxXtNqpb0qnn6BfQsIuXX luUxrp5qI+a6AlqkH1fSHlhzdw== X-Google-Smtp-Source: ABdhPJzUD24F/TZr17nwIVcYrxd8vfKzfmfXbAlOcbW8sRVyKwgtR4FkwC/X7OzrDzLeJS8OW/QmfA== X-Received: by 2002:a17:90b:380f:: with SMTP id mq15mr8912309pjb.66.1643817970945; Wed, 02 Feb 2022 08:06:10 -0800 (PST) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:7ce0:466c:be86:774]) by smtp.gmail.com with ESMTPSA id g5sm14722397pgc.51.2022.02.02.08.06.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 08:06:10 -0800 (PST) From: Hsin-Yi Wang To: Robert Foss , Rob Herring , Xin Ji Cc: David Airlie , Daniel Vetter , Laurent Pinchart , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Jonas Karlman , Jernej Skrabec , Sam Ravnborg , Maxime Ripard Subject: [PATCH RESEND v5 2/4] drm/bridge: anx7625: Convert to use devm_kzalloc Date: Thu, 3 Feb 2022 00:06:00 +0800 Message-Id: <20220202160602.440792-2-hsinyi@chromium.org> X-Mailer: git-send-email 2.35.0.rc2.247.g8bbb082509-goog In-Reply-To: <20220202160602.440792-1-hsinyi@chromium.org> References: <20220202160602.440792-1-hsinyi@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Use devm_kzalloc instead of kzalloc and drop kfree(). Let the memory handled by driver detach. Signed-off-by: Hsin-Yi Wang Reviewed-by: Xin Ji --- v2->v3: remove kfree() in anx7625_i2c_remove(). --- drivers/gpu/drm/bridge/analogix/anx7625.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 17b23940549a42..b7e3373994b480 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -2515,7 +2515,7 @@ static int anx7625_i2c_probe(struct i2c_client *client, return -ENODEV; } - platform = kzalloc(sizeof(*platform), GFP_KERNEL); + platform = devm_kzalloc(dev, sizeof(*platform), GFP_KERNEL); if (!platform) { DRM_DEV_ERROR(dev, "fail to allocate driver data\n"); return -ENOMEM; @@ -2527,7 +2527,7 @@ static int anx7625_i2c_probe(struct i2c_client *client, if (ret) { if (ret != -EPROBE_DEFER) DRM_DEV_ERROR(dev, "fail to parse DT : %d\n", ret); - goto free_platform; + return ret; } platform->client = client; @@ -2552,7 +2552,7 @@ static int anx7625_i2c_probe(struct i2c_client *client, if (!platform->hdcp_workqueue) { dev_err(dev, "fail to create work queue\n"); ret = -ENOMEM; - goto free_platform; + return ret; } platform->pdata.intp_irq = client->irq; @@ -2637,9 +2637,6 @@ static int anx7625_i2c_probe(struct i2c_client *client, if (platform->hdcp_workqueue) destroy_workqueue(platform->hdcp_workqueue); -free_platform: - kfree(platform); - return ret; } @@ -2666,7 +2663,6 @@ static int anx7625_i2c_remove(struct i2c_client *client) if (platform->pdata.audio_en) anx7625_unregister_audio(platform); - kfree(platform); return 0; } From patchwork Wed Feb 2 16:06:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 539437 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 B92FCC433FE for ; Wed, 2 Feb 2022 16:06:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345763AbiBBQGX (ORCPT ); Wed, 2 Feb 2022 11:06:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345769AbiBBQGR (ORCPT ); Wed, 2 Feb 2022 11:06:17 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 532CBC06173E for ; Wed, 2 Feb 2022 08:06:17 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id b15so18761076plg.3 for ; Wed, 02 Feb 2022 08:06:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ye0S9ZGhY+9EmUZN3Zyu0p+11AX+B8bmbaaOWhr2T0c=; b=THKJNrl8wZq9kLm8aIUQsyrUyYnORIkUj0AsqjphNpw6zKOLSU8mqe9LQMXJhqfiew 6DsPPj5bqxhMpt7Fi9y3F1lK310+oJJ9mGsTFpzoKxamrrhR4Ba+/AupkvmyEhHI99Zg W2nXGzr1QnqjZvGL1A0rlvwPLTg4hCskXlNps= 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=Ye0S9ZGhY+9EmUZN3Zyu0p+11AX+B8bmbaaOWhr2T0c=; b=yHYi7JGgYov0M0tHjHHE0yOTcdoxpQp8RcZUdABGBTLZ4DMWM9jjYeM+cstthJLBjT XP1nUzplrMZ2FDtPsCCJrpg8DA1iiGNIcKoQeb17PEd/Xat7dKnu/1xLOEmBZ7NP+ezH IO/cISCgu1OWDp8LHSfhKaxDcFEQdY9EkHsRVo4d/0SvGKbIoywkk/o9N69RacWc/Yio a9uv06tvXeDAQDD841V0G5wkq+48AIoNpizDSoHZ94y7Ej5uWpwmeBTEKYYq85GIosjZ oiBAxJhOC/XDo/VwcQPhfgVx+GZntHKzNngQqH5RG3HK+xJ/o3INvHRu+rBK32LBbBws hoyQ== X-Gm-Message-State: AOAM5313sszXn34ZA8DkDGDqYtvqSz+08uXc/kDs95r/PYljMdks62va bBwGUOoxmaWG8bOKd0wh6UkBKA== X-Google-Smtp-Source: ABdhPJwmobxexK4WZn3maJdnwfwFpSVFi9apHR9NwFwzjjq9KmTbT11kIv6UjVpfSKsQhHnnARnRsg== X-Received: by 2002:a17:90b:38c7:: with SMTP id nn7mr8872415pjb.124.1643817976720; Wed, 02 Feb 2022 08:06:16 -0800 (PST) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:7ce0:466c:be86:774]) by smtp.gmail.com with ESMTPSA id g5sm14722397pgc.51.2022.02.02.08.06.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 08:06:16 -0800 (PST) From: Hsin-Yi Wang To: Robert Foss , Rob Herring , Xin Ji Cc: David Airlie , Daniel Vetter , Laurent Pinchart , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Jonas Karlman , Jernej Skrabec , Sam Ravnborg , Maxime Ripard Subject: [PATCH RESEND v5 4/4] dt-bindings: drm/bridge: anx7625: Add aux-bus node Date: Thu, 3 Feb 2022 00:06:02 +0800 Message-Id: <20220202160602.440792-4-hsinyi@chromium.org> X-Mailer: git-send-email 2.35.0.rc2.247.g8bbb082509-goog In-Reply-To: <20220202160602.440792-1-hsinyi@chromium.org> References: <20220202160602.440792-1-hsinyi@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org List panel under aux-bus node if it's connected to anx7625's aux bus. Signed-off-by: Hsin-Yi Wang --- .../display/bridge/analogix,anx7625.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml b/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml index 1d3e88daca041a..0d38d6fe39830f 100644 --- a/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +++ b/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml @@ -83,6 +83,9 @@ properties: type: boolean description: let the driver enable audio HDMI codec function or not. + aux-bus: + $ref: /schemas/display/dp-aux-bus.yaml# + ports: $ref: /schemas/graph.yaml#/properties/ports @@ -167,5 +170,19 @@ examples: }; }; }; + + aux-bus { + panel { + compatible = "innolux,n125hce-gn1"; + power-supply = <&pp3300_disp_x>; + backlight = <&backlight_lcd0>; + + port { + panel_in: endpoint { + remote-endpoint = <&anx7625_out>; + }; + }; + }; + }; }; };