Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp729430imm; Wed, 23 May 2018 04:46:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZosnEz2WDomJn/p74Yu4gtjSwgu4PmUUlWtoQL8t0RQf5t5eRmfRW/uhWgw7TsETEKM7PF+ X-Received: by 2002:a62:6c87:: with SMTP id h129-v6mr2547240pfc.179.1527075966236; Wed, 23 May 2018 04:46:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527075966; cv=none; d=google.com; s=arc-20160816; b=aQZhsNtMDcCKTKXfQwScsrzoH4MBvIDxupQFHgEaFxF5bNcgkWdWtkQ05Fj7Z31elx wJmfW2eVN9dKG4NBuRZPLWesPQn40Bni8TVknS6JbimoJKJtRf5gxz1tI6zPDqbqT3vP NxdO70MGjZwYW342kkvem8jxHoXQkhcNgOu/zGDG6jtT+9Wf4C7IvWaCmDZ6EDzjUTfq QYJCxPYz8tqSengyaDu/yF/OPsxDrTsER/R8cgTVdiBELebAuaAeczQEKjg2QAoooOdt O6E2ls+x4/4/ayv9c1bELu2ZvfHjk+JngaOu/Dr7gNbmcHN5zyS5HjvYUA7aRCt5YemH jlbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=4pThVJ7Q7TMeH2fdnlWhPhx5JsgrC2UpJj1Aalppbg8=; b=VEWVo9LfojmZVVmz6Q+yTqagegbdrxNRtxYuTSXtQdJeSOCBFMzoUPdLbmxgZvj7Do f8VsoRCgbkiGKF2DnJji/VR+T6pqYCS65n8NgM7Eailsgq1m76+E6e80+B0DxxSa7sZ1 ieDkdeSquIhy2dKIk4izHaxe1SK26F9Vwxkz7wgA5e/c6QQ6aPhl54srZBYofJ+QHuMV wlBftjUWDQ6ZakcQTS8fyhxw2vnSNbBVlpafydtemoAQNGc2dOTZITASUy91OeJHSBXc i/ICkL2DjoC4O8mNhiSeb5y0hL2tsVi3j/s1tF6bLEE7t+yP6oWGdVIF1WVO/V1u0SU8 h2Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pIg76Rzs; 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 g12-v6si18213347plo.406.2018.05.23.04.45.50; Wed, 23 May 2018 04:46: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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pIg76Rzs; 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 S932640AbeEWLmy (ORCPT + 99 others); Wed, 23 May 2018 07:42:54 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35138 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932529AbeEWLmx (ORCPT ); Wed, 23 May 2018 07:42:53 -0400 Received: by mail-wm0-f66.google.com with SMTP id o78-v6so8388711wmg.0; Wed, 23 May 2018 04:42:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=4pThVJ7Q7TMeH2fdnlWhPhx5JsgrC2UpJj1Aalppbg8=; b=pIg76RzsBAh3kaP7JYfZCXOyP6Oy6Bx2/eUBBIQXPQfoh3Y1upj9GsQT9DHKC3bdLN nwRyrZya5lHvG3hkr85oTM9Rgdsmrg/8xNWkYMazRFJ2pmwasFWnzkeQN+CRl/htR9cg T3uu5H42uzmSZsvkDPKxEIzsMaxzyw4vSWFeRdwcf7jm6bIQnb/PGKEJPi0jwu79s+nF PtBD732bAI/6EFSlGy6+aeyJKbIJTvpLIFzie7NlBpdY3l9jPiSWwlFPf2NdMq3T54tp KP0e+6OwnR/IIItUdvi3ER8/SJzXY6eQhNXs2vBxLP3ikJuAeBRblHtUaYj8B2tGuH/f juGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4pThVJ7Q7TMeH2fdnlWhPhx5JsgrC2UpJj1Aalppbg8=; b=pBcUTi9o4AB5i7XPCV5aafRVqpIAfA2DC+o2lpWF1tAxWTkNfaRFvJWjLBVsLAnbHh ocVHux3t0iucqOqfzIybhm8zCZqKGI0gLjjV/zzQWzW8RaTEXO7TZIo48Yc2oMvT0nAn PVm8romxC+FrUYTPlTHNXVjWuvUGkJd0ZYVcqIZLK5zE/xGfxD8GvnRK5NE6cd60UCzu 9pG5hEVtVxBSmbMuMgsFVtdnCao56m04elE9d63SJuKN4b0zMXBPK0pXdZgZkjY6lSYi RWNL8BUQS4kM3hfQM9+mjuLw4Kl7Y9nSSOeW0bBb4mwHINv7jA9tg1+k2K1hyR/fRM3t q6Ew== X-Gm-Message-State: ALKqPwfMy+phiFv625thBxzg5HIObdQTVJGJVzNzcNzte5AiUbeMdTAb 7wqGWLUrPjOmt6nkuIoUREVC3O9N X-Received: by 2002:a1c:8583:: with SMTP id h125-v6mr3767370wmd.98.1527075771613; Wed, 23 May 2018 04:42:51 -0700 (PDT) Received: from kurokawa.lan (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id y45-v6sm17382223wrd.97.2018.05.23.04.42.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 04:42:50 -0700 (PDT) From: Marek Vasut X-Google-Original-From: Marek Vasut To: linux-kernel@vger.kernel.org Cc: Marek Vasut , Geert Uytterhoeven , Lee Jones , Mark Brown , Steve Twiss , Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH 1/6] mfd: da9063: Rename PMIC_DA9063 to PMIC_CHIP_ID_DA9063 Date: Wed, 23 May 2018 13:42:25 +0200 Message-Id: <20180523114230.10109-1-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The PMIC_DA9063 is a complete misnomer, it denotes the value of the DA9063 chip ID register, so rename it as such. It is also the value of chip ID register of DA9063L though, so drop the enum as all the DA9063 "models" share the same chip ID and thus the distinction will have to be made using DT or otherwise. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Lee Jones Cc: Mark Brown Cc: Steve Twiss Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org --- drivers/mfd/da9063-core.c | 2 +- drivers/mfd/da9063-i2c.c | 2 +- drivers/regulator/da9063-regulator.c | 2 +- include/linux/mfd/da9063/core.h | 4 +--- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/da9063-core.c b/drivers/mfd/da9063-core.c index 6c2870d4e754..00b3caee4e21 100644 --- a/drivers/mfd/da9063-core.c +++ b/drivers/mfd/da9063-core.c @@ -192,7 +192,7 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq) dev_err(da9063->dev, "Cannot read chip model id.\n"); return -EIO; } - if (model != PMIC_DA9063) { + if (model != PMIC_CHIP_ID_DA9063) { dev_err(da9063->dev, "Invalid chip model id: 0x%02x\n", model); return -ENODEV; } diff --git a/drivers/mfd/da9063-i2c.c b/drivers/mfd/da9063-i2c.c index 981805a2c521..7f84030c8d53 100644 --- a/drivers/mfd/da9063-i2c.c +++ b/drivers/mfd/da9063-i2c.c @@ -280,7 +280,7 @@ static int da9063_i2c_remove(struct i2c_client *i2c) } static const struct i2c_device_id da9063_i2c_id[] = { - {"da9063", PMIC_DA9063}, + { "da9063", PMIC_CHIP_ID_DA9063 }, {}, }; MODULE_DEVICE_TABLE(i2c, da9063_i2c_id); diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c index 6a8f9cd69f52..87c884ae0064 100644 --- a/drivers/regulator/da9063-regulator.c +++ b/drivers/regulator/da9063-regulator.c @@ -585,7 +585,7 @@ static struct da9063_dev_model regulators_models[] = { { .regulator_info = da9063_regulator_info, .n_regulators = ARRAY_SIZE(da9063_regulator_info), - .dev_model = PMIC_DA9063, + .dev_model = PMIC_CHIP_ID_DA9063, }, { } }; diff --git a/include/linux/mfd/da9063/core.h b/include/linux/mfd/da9063/core.h index f3ae65db4c86..664f650d0086 100644 --- a/include/linux/mfd/da9063/core.h +++ b/include/linux/mfd/da9063/core.h @@ -29,9 +29,7 @@ #define DA9063_DRVNAME_RTC "da9063-rtc" #define DA9063_DRVNAME_VIBRATION "da9063-vibration" -enum da9063_models { - PMIC_DA9063 = 0x61, -}; +#define PMIC_CHIP_ID_DA9063 0x61 enum da9063_variant_codes { PMIC_DA9063_AD = 0x3, -- 2.16.2