Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp767907imm; Wed, 23 May 2018 05:22:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoxaQpP77S0jFii2/FhdPFi1oZbvmlsNLu8vM9xD24B9lDGSuNyq9rDrT5yIfRX8+p0zFVR X-Received: by 2002:a65:4ecc:: with SMTP id w12-v6mr2172543pgq.214.1527078162641; Wed, 23 May 2018 05:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527078162; cv=none; d=google.com; s=arc-20160816; b=Q4bstqNInZfRUUJWDpxtMyUzCF3y9O2/VceJfu4250bEYOIAYbafo7WZ4aTmwB4SnR 1XLO7q3a3/Bv/k15KxKqpLmiM2MGdQRxaDOTEbRDNT2Oh0fs7d8gykpEkohR/jkx9U7m 5OhfRHsmFIIoc9kqgMLmjlgCoe2o6Mj+8KL7tHs/luk98ycn7Rq9J3rRNAzFsTB/ZZrv 9vBpH+lY/BMWNqVUlIg9Aw033x+2wUjTTf9kLhoCyobhmKF8KlRLHGC7KI+ffp2HstUP bne+Bun5/jSJAQGP7+GaDKzGFz3CDXUzDL0hoBkDJ1hmDo5JeBq55fYg+vxtNnFk/ozo mljw== 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=0UxulEq5OwRw/O5Tf2ts2BxrWqhAsCHW3477KckHSXA=; b=w6VZTEZP9ESpV6aXQQJAZP3G0C2DVymgp1zet5oOMMlKHs8uJ4t1/Muem+zp41uE24 vcwckSH0U2jMuM364/MANC/S+5MV4iCn3yhEzAyeV4XfWvrE82d1JnLCdjS0Bw0ZIAv+ SwWG38bLmDcPHjtUFywC8KhgqHy/kjIwnjLzeOt8p8loooKQnMYbPj5aR2PrH/Hi8aGQ O3tsrTgOOSU6OyMpCzWclLeaWm/1tyoNTFJwbvzVdPj8/cGfmtLHvY+GwuypEy94WB49 +8IH36jyx+4M8xxxRb5S3OnQuI3cTJBud43Mrp7ZBCPtr1OuFRunnTDzHWu1BTc+3MoL L4bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=urVg4f9G; 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 g7-v6si18156899plo.95.2018.05.23.05.22.27; Wed, 23 May 2018 05:22:42 -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=urVg4f9G; 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 S932932AbeEWMWN (ORCPT + 99 others); Wed, 23 May 2018 08:22:13 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:39398 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932620AbeEWMWG (ORCPT ); Wed, 23 May 2018 08:22:06 -0400 Received: by mail-wm0-f68.google.com with SMTP id f8-v6so8633273wmc.4; Wed, 23 May 2018 05:22:06 -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=0UxulEq5OwRw/O5Tf2ts2BxrWqhAsCHW3477KckHSXA=; b=urVg4f9G8yDWiEdlODpyLezeCkNjEb9dx3dPkuWu0d6jPlChTMox+tDfvqOsd1727/ f93J+yYYTLZeQCqLUBytyCf9XgkD5brulaiY4QV1rLQ/ubOD5+uWpMbre8OjMV4mS6G8 z55VITymn1AyPZ9ZfVpDhJZubJZz+p5DoqO2A6I5G7sTc3MtoZMywSwJ/ddgsm0OxEhn G6pBB1jhHVIIfIokgTGrMvN6ZpBu93a8KCwIpZ8IXbeYAIXiv78+dLn+FzA+Z4nXyIn9 AbyUEphjy9LqE5HdlIUAW6G72xbnZytbI3Klyhqo4CzdTMHtS4ADLdAETzIgSXK837bU c1+w== 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=0UxulEq5OwRw/O5Tf2ts2BxrWqhAsCHW3477KckHSXA=; b=kt0N7Yeg5+PbNwh+hkAEwTz3wN5Fg7elLPoZwifuQ9NBGC7PDkFORf1GW9HhP4R1nj cAjiMDi5OUyuJDiYypaPotw81tVZlM9r97BU9XdiscVsd720mNgMWw+Bv87P+CN98H2y bg6GkMKZ9H8GrNXNHNk3JbvZJC72dROA6NfkEw0ohlA+JE8zJ+Ht2c6IgruzeBNMH1h2 kh1OStiRu5GixfDSp0tF9Pao6dc0BdTgam4MlKhfZ0G48wskhWqaazXXEzq2HEzeiiru r9HhL9Agyk3ocDZVgXH7qAgEUfSxAQb/v4y8SbXV2osf2g27czl7FJrolTE5e+DPz+TH Gynw== X-Gm-Message-State: ALKqPwdGz+nEJrriPN/arujAwOtyS/DUpYDOdjD7dVJAueG3I0kfDxvk +0nd3syFGPdSABIJmdYb29HDJVlg X-Received: by 2002:a1c:e156:: with SMTP id y83-v6mr4473645wmg.92.1527078125120; Wed, 23 May 2018 05:22:05 -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 64-v6sm1950953wmb.2.2018.05.23.05.22.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 05:22:04 -0700 (PDT) Subject: Re: [PATCH 2/6] mfd: da9063: Replace model with type To: Geert Uytterhoeven Cc: Linux Kernel Mailing List , Marek Vasut , Geert Uytterhoeven , Lee Jones , Mark Brown , Steve Twiss , Wolfram Sang , Linux-Renesas References: <20180523114230.10109-1-marek.vasut+renesas@gmail.com> <20180523114230.10109-2-marek.vasut+renesas@gmail.com> From: Marek Vasut Message-ID: <9a3e05ee-2ba4-e72b-8aee-662b67985ebb@gmail.com> Date: Wed, 23 May 2018 14:15:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.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 05/23/2018 01:55 PM, Geert Uytterhoeven wrote: > On Wed, May 23, 2018 at 1:42 PM, Marek Vasut wrote: >> The model number stored in the struct da9063 is the same for all >> variants of the da9063 since it is the chip ID, which is always >> the same. Replace that with a separate identifier instead, which >> allows us to discern the DA9063 variants by setting the type >> based on either DT match or otherwise. >> >> Signed-off-by: Marek Vasut > > Reviewed-by: Geert Uytterhoeven > >> --- a/drivers/mfd/da9063-i2c.c >> +++ b/drivers/mfd/da9063-i2c.c >> @@ -248,6 +248,7 @@ static int da9063_i2c_probe(struct i2c_client *i2c, >> i2c_set_clientdata(i2c, da9063); >> da9063->dev = &i2c->dev; >> da9063->chip_irq = i2c->irq; >> + da9063->type = (enum da9063_type)id->driver_data; > > Nit: I think this cast (from unsigned long) is not needed. Dropped -- Best regards, Marek Vasut