From patchwork Wed Oct 6 05:45:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Ha=C5=82asa?= X-Patchwork-Id: 12538637 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EA67C433FE for ; Wed, 6 Oct 2021 05:45:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 741BA610A8 for ; Wed, 6 Oct 2021 05:45:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233284AbhJFFrd convert rfc822-to-8bit (ORCPT ); Wed, 6 Oct 2021 01:47:33 -0400 Received: from ni.piap.pl ([195.187.100.5]:44002 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbhJFFrc (ORCPT ); Wed, 6 Oct 2021 01:47:32 -0400 From: =?utf-8?q?Krzysztof_Ha=C5=82asa?= To: Hans Verkuil Cc: Mauro Carvalho Chehab , Rob Herring , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] Add ADV7610 support for adv7604 driver - DT docs. Date: Wed, 06 Oct 2021 07:45:38 +0200 Message-ID: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org ADV7610 is another HDMI receiver chip, very similar to the ADV7611. Tested on TinyRex BaseBoard Lite. Signed-off-by: Krzysztof Hałasa Acked-by: Rob Herring diff --git a/Documentation/devicetree/bindings/media/i2c/adv7604.yaml b/Documentation/devicetree/bindings/media/i2c/adv7604.yaml index de15cebe2955..c19d8391e2d5 100644 --- a/Documentation/devicetree/bindings/media/i2c/adv7604.yaml +++ b/Documentation/devicetree/bindings/media/i2c/adv7604.yaml @@ -4,23 +4,24 @@ $id: http://devicetree.org/schemas/media/i2c/adv7604.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Analog Devices ADV7604/11/12 video decoder with HDMI receiver +title: Analog Devices ADV7604/10/11/12 video decoder with HDMI receiver maintainers: - Hans Verkuil description: - The ADV7604 and ADV7611/12 are multiformat video decoders with an integrated - HDMI receiver. The ADV7604 has four multiplexed HDMI inputs and one analog - input, and the ADV7611 has one HDMI input and no analog input. The 7612 is - similar to the 7611 but has 2 HDMI inputs. + The ADV7604 and ADV7610/11/12 are multiformat video decoders with + an integrated HDMI receiver. The ADV7604 has four multiplexed HDMI inputs + and one analog input, and the ADV7610/11 have one HDMI input and no analog + input. The ADV7612 is similar to the ADV7610/11 but has 2 HDMI inputs. - These device tree bindings support the ADV7611/12 only at the moment. + These device tree bindings support the ADV7610/11/12 only at the moment. properties: compatible: items: - enum: + - adi,adv7610 - adi,adv7611 - adi,adv7612 From patchwork Wed Oct 6 05:49:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Ha=C5=82asa?= X-Patchwork-Id: 12538643 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21F0AC433F5 for ; Wed, 6 Oct 2021 05:49:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EED306113D for ; Wed, 6 Oct 2021 05:49:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234547AbhJFFvl convert rfc822-to-8bit (ORCPT ); Wed, 6 Oct 2021 01:51:41 -0400 Received: from ni.piap.pl ([195.187.100.5]:44250 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235061AbhJFFvl (ORCPT ); Wed, 6 Oct 2021 01:51:41 -0400 From: =?utf-8?q?Krzysztof_Ha=C5=82asa?= To: Hans Verkuil Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] Add ADV7610 support for adv7604 driver. Date: Wed, 06 Oct 2021 07:49:48 +0200 Message-ID: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org ADV7610 is another HDMI receiver chip, very similar to the ADV7611. Also: print chip names in upper case. Fix an error message claiming that no ADV761x has been found, while in reality a chip different than requested (though still supported) may have been found. Tested on TinyRex BaseBoard Lite. Signed-off-by: Krzysztof Hałasa diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 122e1fdccd96..4d7a19e6b8f1 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -41,7 +41,7 @@ static int debug; module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "debug level (0-2)"); -MODULE_DESCRIPTION("Analog Devices ADV7604 video decoder driver"); +MODULE_DESCRIPTION("Analog Devices ADV7604/10/11/12 video decoder driver"); MODULE_AUTHOR("Hans Verkuil "); MODULE_AUTHOR("Mats Randgaard "); MODULE_LICENSE("GPL"); @@ -77,7 +77,7 @@ MODULE_LICENSE("GPL"); enum adv76xx_type { ADV7604, - ADV7611, + ADV7611, // including ADV7610 ADV7612, }; @@ -3176,6 +3176,7 @@ static const struct adv76xx_chip_info adv76xx_chip_info[] = { static const struct i2c_device_id adv76xx_i2c_id[] = { { "adv7604", (kernel_ulong_t)&adv76xx_chip_info[ADV7604] }, + { "adv7610", (kernel_ulong_t)&adv76xx_chip_info[ADV7611] }, { "adv7611", (kernel_ulong_t)&adv76xx_chip_info[ADV7611] }, { "adv7612", (kernel_ulong_t)&adv76xx_chip_info[ADV7612] }, { } @@ -3183,6 +3184,7 @@ static const struct i2c_device_id adv76xx_i2c_id[] = { MODULE_DEVICE_TABLE(i2c, adv76xx_i2c_id); static const struct of_device_id adv76xx_of_id[] __maybe_unused = { + { .compatible = "adi,adv7610", .data = &adv76xx_chip_info[ADV7611] }, { .compatible = "adi,adv7611", .data = &adv76xx_chip_info[ADV7611] }, { .compatible = "adi,adv7612", .data = &adv76xx_chip_info[ADV7612] }, { } @@ -3500,7 +3502,7 @@ static int adv76xx_probe(struct i2c_client *client, return -ENODEV; } if (val != 0x68) { - v4l2_err(sd, "not an adv7604 on address 0x%x\n", + v4l2_err(sd, "not an ADV7604 on address 0x%x\n", client->addr << 1); return -ENODEV; } @@ -3525,7 +3527,8 @@ static int adv76xx_probe(struct i2c_client *client, val |= val2; if ((state->info->type == ADV7611 && val != 0x2051) || (state->info->type == ADV7612 && val != 0x2041)) { - v4l2_err(sd, "not an adv761x on address 0x%x\n", + v4l2_err(sd, "not an %s on address 0x%x\n", + state->info->type == ADV7611 ? "ADV7610/11" : "ADV7612", client->addr << 1); return -ENODEV; }