Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp739844imm; Wed, 23 May 2018 04:57:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqBze0nzWtM3wfDdC0dZb7h+GDvAEo61HTqpzEHOW2O9Aro5F6yMymfs8YYoof6yFYnRXvw X-Received: by 2002:a62:5754:: with SMTP id l81-v6mr2634306pfb.56.1527076649783; Wed, 23 May 2018 04:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527076649; cv=none; d=google.com; s=arc-20160816; b=dxJ/fPGwN3SeQCDyBwoiSm0f/kpaoH66JJqYXAzKSvCMyefh72YbTCNhdpZcBtNBGf QGQ5yoY3QOX5YIkwL9Av4ABwdNoVkALzPpN8igra1kfbNLUtciqYrh4fhkXRu0SwXABJ Bj7kHem++aQ40YwkiZ57ga19iuvqRMpZGhoePzvd0+FleEgZEWiBLvd178pFWnLTHIqh 1uQUqMIOtRFy0wh5XR0HEgUvVoNoIj+MT/vKk3nq8C5hYq00j2LpWABLtIN8YL9A8h83 nvfiVBUN4eMPb6v25hcj7bZlpl0LDAEgTR+zBOff9maWPR5dP1y5V+t0YooQQ/37sFSK 29vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=9Fnn7tWcYb9VcroqCAx/oiCpmugORZTm6WKXTwFylBA=; b=nJheitmX2Sc63XuqpvjbCV1EaCtfNt2Lpw8WqRhLpyklDygBj4wKY7WB2T23j5XBC0 b+Bfy06IAS9+A+LCzYYMv8by8EymGhPsCk72CGzUxNNI2sb/5RylwP6L3wAaSBeocHP8 qG20x7xoB0wPDRBajfvW+AeEW1T8ruIyrKZS5xZfc1oAM/ir/72mzUA5H9SDPiNKxRax eFz3bjvz0gNkEyi61ibPRp0CeSAdemloARwdOM0qUaTQ/Mkx5qDTmnZq/LPmwzg8v6Tq p459XmzVIWAXyTtUNmxcYyW6PGLRCAK9jqcBbn1+CC6AznOOhTOoNSVppKmAhbrSY/c5 OEZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=hESRiIG0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h34-v6si9999447pld.330.2018.05.23.04.57.15; Wed, 23 May 2018 04:57:29 -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=fail header.i=@gmail.com header.s=20161025 header.b=hESRiIG0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932743AbeEWL4B (ORCPT + 99 others); Wed, 23 May 2018 07:56:01 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:46681 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932485AbeEWLz6 (ORCPT ); Wed, 23 May 2018 07:55:58 -0400 Received: by mail-ua0-f195.google.com with SMTP id e8-v6so14524727uam.13; Wed, 23 May 2018 04:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9Fnn7tWcYb9VcroqCAx/oiCpmugORZTm6WKXTwFylBA=; b=hESRiIG0PqNhfEqdNRNzAJa40fJINgJhWRUjxmW2LKKm6hh7evBhISVk7nPKxu+uul eE3TD7DDJzfOvx2UbFYdQZjDUKRCmDwz0WvUCdd+kI4wTupPvGBMmginCE3TfAC1fNPt jBe1p/GsHFl7LxILCNlD39JR+empE9jMqL4yEwZ1a7VXf5UivuTFaae6yHDe28j+M85h GGmGO5sDwquVWPDzhgenmL54TDYbYgeuWkOD9JX5NNSgH4PgYc54qd+Mu27msSfADcaf EZYMS42DC1+9qbOSivvZ6Zc1WgRzbNFpP8QGkcrK+YOX3x5wY8/u2gbPKrzJY2JZirdW kfZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9Fnn7tWcYb9VcroqCAx/oiCpmugORZTm6WKXTwFylBA=; b=WOqHfDw5LHyzvFSgDq2QfoeGD8v6KBUeKLqU5N/XXrR1fiJ0iHOBH9iq2d3RHSj5GW S9Vs/7nk356EAKMbh/JQ9Qs1xFhL7m4KWbhCy+VdcSCNhZAqFx5DjviJxZ12BVrYAO8L jaJ65VnB3SNor+YI0lOlqHV9qqOZ8iYxdPG8iu0x/nsWMS3pERw0nAckTMs+TvJnxZsO e3suShjfoyDidFl89prTaTYZt9/DQ3sh99vecXIRV4YtWoHaJTgiM4mBxjC4vkHGNX0d Y7xGEsMCcoHPB12i+0vuZf4HMrNL74c/VEh5IR7zNceKyiw5WKnXBBuaZKXMxX2samDV cQyA== X-Gm-Message-State: ALKqPwcku9ptWLlMyj8ISF2UMqwaA2FDmDS3LXqa78dTe3yYZEiNpOQE zgmNEmNWF1P52p5TMsAOuSa0lJMUG32q3hvC0xk= X-Received: by 2002:ab0:2493:: with SMTP id i19-v6mr1616047uan.180.1527076558088; Wed, 23 May 2018 04:55:58 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:7a0a:0:0:0:0:0 with HTTP; Wed, 23 May 2018 04:55:57 -0700 (PDT) In-Reply-To: <20180523114230.10109-2-marek.vasut+renesas@gmail.com> References: <20180523114230.10109-1-marek.vasut+renesas@gmail.com> <20180523114230.10109-2-marek.vasut+renesas@gmail.com> From: Geert Uytterhoeven Date: Wed, 23 May 2018 13:55:57 +0200 X-Google-Sender-Auth: _zkoPENBu3VDepnbodgywaIo8fU Message-ID: Subject: Re: [PATCH 2/6] mfd: da9063: Replace model with type To: Marek Vasut Cc: Linux Kernel Mailing List , Marek Vasut , Geert Uytterhoeven , Lee Jones , Mark Brown , Steve Twiss , Wolfram Sang , Linux-Renesas Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds