Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2422558imm; Thu, 27 Sep 2018 12:36:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV626LGA+LtqzGbsxzTEbUYkOUQE89Q+BKMMZ7kEIeWeMr2jriFysH2j/4AbZEEvAO98oXMbW X-Received: by 2002:a17:902:d704:: with SMTP id w4-v6mr12797556ply.230.1538076966829; Thu, 27 Sep 2018 12:36:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538076966; cv=none; d=google.com; s=arc-20160816; b=syQwWYNnvU36qmePzIwVjhqDWQ6TbbuipXzYzhxiU+oWABBSOSvlIeysIqYTZSTc33 K2Q0+TS9Siwj9+5k8cj/DAulNAmnVeuxKX87aOW3WZoHz+vIFeuW75RQBqF08BW496FV Gb0zr92n03ytGVR9iuolrwWccWhKeo1VI4NjO08T9ONee7TcYvdEPH0GzLdVBneI+LsH 1JBTu3LyiNozC0cs3uYcZKFtk+TlWaQiHP000DeUfiwRayweE7brHbsAVZ1gIX3IgpJY sDHTKGqqyTt02jyNPEvv/ZkRCMRe8CgK081mF3ZmaR9mKVmBtnYXWXirmcAQVe191FxW SwaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8lGayVnwRxh+h38uDNHbwEIpsCOK8AxrJ+24M4R3AbM=; b=L8zU8jg9i6/I8Tpp72LMC0X2eYbnsHk2vVoYLMAuihmcXW8jJzsP40K5hUTwcIC2Ow D4wZT9tMyfBWgInT2J83VZUan3c804+6sU1hOxtqDiKyX/jdVKWTMXa1V7picmf5xSbr DsKKErhEmCFo8sM8taZpRE70DJ3srXaX9tlzQSJ0TtsyLNcc9Zueftek7AgDwnynQD+8 gebfBnLFHtw6gtYghJ6nr0NSpRX48OIbm3PrkaSEyMOyOy7rB7prB6VoEyNYYo+JB/s3 nQn8Hl+kEnbqD2YoX9BS1BGyyWz5lVJv0Sipo0+qfjgamn+/sNBnZ3u7EsSjbOSEY8QC Z8KQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p34-v6si2654171pgl.198.2018.09.27.12.35.50; Thu, 27 Sep 2018 12:36:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728654AbeI1BzB (ORCPT + 99 others); Thu, 27 Sep 2018 21:55:01 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:59526 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727621AbeI1BzB (ORCPT ); Thu, 27 Sep 2018 21:55:01 -0400 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2001:1bc8:1a6:d3d5::80:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id 49B8F634C80; Thu, 27 Sep 2018 22:35:09 +0300 (EEST) Received: from sakke by valkosipuli.localdomain with local (Exim 4.89) (envelope-from ) id 1g5c45-0000Ew-42; Thu, 27 Sep 2018 22:35:09 +0300 Date: Thu, 27 Sep 2018 22:35:08 +0300 From: Sakari Ailus To: Ricardo Ribalda Delgado Cc: Pavel Machek , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Verkuil , Laurent Pinchart Subject: Re: [PATCH v4 6/7] [media] ad5820: Add support for ad5821 and ad5823 Message-ID: <20180927193508.r25owgcwfeui2x7k@valkosipuli.retiisi.org.uk> References: <20180920204751.29117-1-ricardo.ribalda@gmail.com> <20180920204751.29117-6-ricardo.ribalda@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180920204751.29117-6-ricardo.ribalda@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ricardo, On Thu, Sep 20, 2018 at 10:47:50PM +0200, Ricardo Ribalda Delgado wrote: > According to the datasheet, both AD5821 and AD5820 share a compatible > register-set: > http://www.analog.com/media/en/technical-documentation/data-sheets/AD5821.pdf > > Some camera modules also refer that AD5823 is a replacement of AD5820: > https://download.kamami.com/p564094-OV8865_DS.pdf A silly question --- the maximum current of these devices differs from each other. Is the control value range still the same? > > Suggested-by: Pavel Machek > Signed-off-by: Ricardo Ribalda Delgado > --- > drivers/media/i2c/ad5820.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820.c > index 5d1185e7f78d..c52af302d516 100644 > --- a/drivers/media/i2c/ad5820.c > +++ b/drivers/media/i2c/ad5820.c > @@ -34,8 +34,6 @@ > #include > #include > > -#define AD5820_NAME "ad5820" > - > /* Register definitions */ > #define AD5820_POWER_DOWN (1 << 15) > #define AD5820_DAC_SHIFT 4 > @@ -368,7 +366,9 @@ static int ad5820_remove(struct i2c_client *client) > } > > static const struct i2c_device_id ad5820_id_table[] = { > - { AD5820_NAME, 0 }, > + { "ad5820", 0 }, > + { "ad5821", 0 }, > + { "ad5823", 0 }, > { } > }; > MODULE_DEVICE_TABLE(i2c, ad5820_id_table); > @@ -376,6 +376,8 @@ MODULE_DEVICE_TABLE(i2c, ad5820_id_table); > #ifdef CONFIG_OF > static const struct of_device_id ad5820_of_table[] = { > { .compatible = "adi,ad5820" }, > + { .compatible = "adi,ad5821" }, > + { .compatible = "adi,ad5823" }, You could set the subdev name accordingly as well. > { } > }; > MODULE_DEVICE_TABLE(of, ad5820_of_table); > @@ -384,6 +386,8 @@ MODULE_DEVICE_TABLE(of, ad5820_of_table); > #ifdef CONFIG_ACPI > static const struct acpi_device_id ad5820_acpi_ids[] = { > { "AD5820" }, > + { "AD5821" }, > + { "AD5823" }, > { } > }; > > @@ -394,7 +398,7 @@ static SIMPLE_DEV_PM_OPS(ad5820_pm, ad5820_suspend, ad5820_resume); > > static struct i2c_driver ad5820_i2c_driver = { > .driver = { > - .name = AD5820_NAME, > + .name = "ad5820", > .pm = &ad5820_pm, > .of_match_table = of_match_ptr(ad5820_of_table), > .acpi_match_table = ACPI_PTR(ad5820_acpi_ids), -- Regards, Sakari Ailus e-mail: sakari.ailus@iki.fi