Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3891226imm; Mon, 4 Jun 2018 10:58:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK0603U7DeygZRjOHq09z/ICVTy0NK/vhdvQ8iyXskVQVpcKMe4ZBvntiTxqoeH7qzU56EO X-Received: by 2002:a17:902:bd87:: with SMTP id q7-v6mr5046087pls.147.1528135105875; Mon, 04 Jun 2018 10:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528135105; cv=none; d=google.com; s=arc-20160816; b=E4FIQ3HA1KvwaKAmAwEVhNUC/jm6HnYpeUAx4cosKsX7Kady3+hSna1EQqUAKB1lGU QZl5PcGr5rLjjPsBLCyOuPaUdmoLvJkF9DDnnIxmC6X6wchXxV13aBDtutJ4U68M0RW6 hbB8TWvpvIMDnWzS1+o9ZqGyfUlEqMRSrNLUAaU8RrrUHpoDC/I3rd4QRlyxSamMNuA/ zlx3UHg3xbFCsbC4zMaBoHpPCYmaTu8hR27HXqYmr/qNdqApLNmprPJXKYsV0fJaYaNI PADk6V/ah5KmKfQF5X3Lnb2g5ElppB9rhnTKBo+g2qGN+f4MswTJrP0rQY/oE/w9iY1e CVyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=974O7FtqFIo8qhwhD2W5VvTX+Ybp2mbNnw9gzO2qjJo=; b=JPujqXtQDVBin0infEKFN7iYRFwKBk3adEq1pi6OqbHnv/lrH6DhUbEkMHc0bH9s2J 8sBogDJOZ+/7WDIvo/ecATx5faXn8RhvTS6R9/6ZCLNAV5bEsuOwZHe9S7aEl8mqfCMo wyLz5O2RrOQktVxzuJ11xR/w4S0YjHfHrC6McsY4hLlSXF6FB1d9ZdCpjkFgkwywkqcY HA1i9QTIZgLOoGSQTw7ayqmlGnZMpKdmSEhsQG9PiIO1TQSc3Q1uShbKBZj3UYOE4L5t eBC+7bEfYmqxCH7KKBJxBTHCcfZMC7i/+QH0odAebk8qPE8fl62nt4mKI72NGHbWHd1q jurg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=byl92DJz; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7-v6si45759651plp.304.2018.06.04.10.58.11; Mon, 04 Jun 2018 10:58:25 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=byl92DJz; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752079AbeFDR5U (ORCPT + 99 others); Mon, 4 Jun 2018 13:57:20 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:55699 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbeFDR5E (ORCPT ); Mon, 4 Jun 2018 13:57:04 -0400 Received: by mail-wm0-f66.google.com with SMTP id v16-v6so9706019wmh.5; Mon, 04 Jun 2018 10:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=974O7FtqFIo8qhwhD2W5VvTX+Ybp2mbNnw9gzO2qjJo=; b=byl92DJzzmPcmZLSQyRkIv/ZB3bOlk34FOjUJFwYD3gMqJ4SIbd9DOg8i0p6oQF5Dp SieE/NR8lPtCNOOlde0/z6ar+HvsY2PtE4+WjDnaA2HXbAHNI23SkyRPCBb0Y/Wm8cnE geiFeVLcq3i86EpEEk10zaPpMHnOc6ypDn0EGxzEFdSqOUIfHSovsVfOSu4JL6de3HbF mUcIRg8/+8CWH0itIkIvYmvGerYLM3rF+VEJ8X9dWwLXzuKYzDyDQNUfMXAxJQEH3Z0g 6HiD3QvXOYZi6YAYBzTOnPFdf+UU9v5X17eMzVvW5g8lPEoUnxAKWu3mMtLeIn4KZVkO biDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=974O7FtqFIo8qhwhD2W5VvTX+Ybp2mbNnw9gzO2qjJo=; b=IdcPWZ//pusO1Yic5Bc27StrcymQuKbaeSw/4aMAk4jKJNdTSRjepsPG7Z04Ip1WrU LGpSTNnX9TXAq0c6y5tEiYTf1I3q/WVdLX3Bw3if8/6BuVrIQVgu2yUNkxDfIENY3p52 rrBAGQ8CVHL9qZ9nqwGN8nKwCE9Va1KutlKOtbKX72gCvoCiuzHalx7otn72Ye0KUUUf 8czV5tNE0q5pUUScTJoubhblg2Ex7X7WPjPi4+QGwElDoi4pQI0ngni/o54eRV8nHH40 TrrswOX3WQMix9gAdManI2146A3r3rE072L6uSU38cXREYdD3lQvplZ5DSu0RrOr0B3g Q32g== X-Gm-Message-State: APt69E1tFu23dE41Yi862PNe8Bmwn046pcd1rU6hHNOlKcoL/k9MaFiv EgbiR+yXTmxD5VUsgaRBy3NoFgkK X-Received: by 2002:a1c:d9cb:: with SMTP id q194-v6mr5665529wmg.91.1528135023186; Mon, 04 Jun 2018 10:57:03 -0700 (PDT) Received: from [192.168.1.4] (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id c53-v6sm48530556wrg.12.2018.06.04.10.57.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 10:57:02 -0700 (PDT) Subject: Re: [PATCH v3 06/10] mfd: da9063: Add custom regmap for DA9063L To: Geert Uytterhoeven , Steve Twiss Cc: Linux Kernel Mailing List , Marek Vasut , Geert Uytterhoeven , Lee Jones , Mark Brown , Wolfram Sang , Linux-Renesas References: <20180602101155.26375-1-marek.vasut+renesas@gmail.com> <20180602101155.26375-6-marek.vasut+renesas@gmail.com> From: Marek Vasut Message-ID: <9acdc0af-4be9-91cb-ffed-25133bba73c3@gmail.com> Date: Mon, 4 Jun 2018 18:25:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/04/2018 09:39 AM, Geert Uytterhoeven wrote: > Hi Marek, Steve, > > On Sat, Jun 2, 2018 at 12:11 PM, Marek Vasut wrote: >> While the datasheet for DA9063L (2v1, 23-Mar-2017) lists the RTC register >> block, the DA9063L does not have an RTC. Add custom regmap for DA9063L to >> prevent access into that register block. >> >> Signed-off-by: Marek Vasut > > Thanks for your patch! > >> --- a/drivers/mfd/da9063-i2c.c >> +++ b/drivers/mfd/da9063-i2c.c >> @@ -254,6 +341,10 @@ static int da9063_i2c_probe(struct i2c_client *i2c, > > Note that the line above doesn't check da9063->type, but da9063->variant_code... > >> da9063_regmap_config.rd_table = &da9063_ad_readable_table; >> da9063_regmap_config.wr_table = &da9063_ad_writeable_table; >> da9063_regmap_config.volatile_table = &da9063_ad_volatile_table; >> + } else if (da9063->type == PMIC_TYPE_DA9063L) { > > ... so this may be slightly confusing. I know. >> + da9063_regmap_config.rd_table = &da9063l_bb_readable_table; >> + da9063_regmap_config.wr_table = &da9063l_bb_writeable_table; >> + da9063_regmap_config.volatile_table = &da9063l_bb_volatile_table; >> } else { >> da9063_regmap_config.rd_table = &da9063_bb_readable_table; >> da9063_regmap_config.wr_table = &da9063_bb_writeable_table; > > However, da9063->variant_code doesn't seem to have been filled in at this > point yet (the call to da9063_device_init() doing so is below, at the end > of the probe function!), so commit 9cb42e2a8ed06e91 ("mfd: da9063: Add > support for AD silicon variant") never actually handled the AD silicon variant > correctly? Or am I missing something? Ha, that is a good point. -- Best regards, Marek Vasut