Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1534166imm; Sat, 2 Jun 2018 03:15:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKSeTf48acsvRPXCVnvOZiwpLT+wky1tyJMbS3xsz7eZfnN9cSb4bqYfK0FU2WKW+K8WEqh X-Received: by 2002:a17:902:8497:: with SMTP id c23-v6mr150357plo.124.1527934540965; Sat, 02 Jun 2018 03:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527934540; cv=none; d=google.com; s=arc-20160816; b=RExzrjeXW4R9hE7jJXPIxeCHS18I5khObjK6qajnRZldUxlfVG1zUe6cpjbqwb6iZW 7jtYfzCeKh9VUKJn1swxppJEPnjgpUTS7XZV254O41wXynUYpvqWt7hCt6DsDAiRG5fu RBHGyK9Tjwu/3hPRe65xW5epIanYMoE0RFziyfNJT2cirQC4oz+h1/BkzKXq/0YxRrpy 4LLa/m/Eqpvf/qORLeqUL5hynGLXKlpG4VVIJNqpk9u09BdruT3a2SP+wcbIxY8+RuQh VKf7AL9141msZforvV1ceSWGCdYMyCEK1aTw1FK1EopTXQoi78PZow7+hHp8m9CepNyf O8Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=yLDZ+cjBZ6qPwW4Z903uGIY2eDUZlttE+u2kJ3p3j/o=; b=hdmsyQL12t2MsuEleWAVY5NEdVu/IUgk+G61joxQ2bN8jUvDiZuNx+tdg74EGJClTi Q6+gjyM2MGq13mvT+p4SNpXR8m+gHS+n64AApPYu8bpdoURhtf4WkYwnrc5GQmT0wD94 DYnafzEzlW0pYYQnO4JQv4jnK0TMdPnfN7QrrpaWJK9aEbEpJ2DHTkQM29+oBMv2CuOj hLVuS0FpONdn/ZrxucWDfhLcTDAnUKCrwCfpMdqVX6j+7qhVHG2hOJFF0tXppUUfQokB Syn+f3plTJj+z4wLKBsVzSH3LyoJx1unvEoq4LuYUwEZis5HXCNnsY7akGieohDsRCpy yO7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OVDYNyM4; 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 k16-v6si44037426pli.171.2018.06.02.03.14.56; Sat, 02 Jun 2018 03:15:40 -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=OVDYNyM4; 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 S1751559AbeFBKMu (ORCPT + 99 others); Sat, 2 Jun 2018 06:12:50 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34532 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbeFBKMT (ORCPT ); Sat, 2 Jun 2018 06:12:19 -0400 Received: by mail-wr0-f196.google.com with SMTP id a12-v6so3547630wro.1; Sat, 02 Jun 2018 03:12:18 -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:in-reply-to:references; bh=yLDZ+cjBZ6qPwW4Z903uGIY2eDUZlttE+u2kJ3p3j/o=; b=OVDYNyM4q0ZpltsmtQKXX8S8Yf4yjkb3qB3Da+Bw8W6zw13/SMGObsd0XuJ3j59bZx 5+yIP6f1i7CYhrDIpzpc6e7HPBh4qZunZpXeOtPMN3HKIJd2ZhumtFryAZwKqFz41BOu bK1Yc5njJrmberkOU0yI2jBaPET+h35e76N6SY4S+kwMYSQnpuPKuaWHfaB73ANo1rcF A7zICoesiKjZ0sXlFUYZcEYspzTKG1NqKSjElKxWPIZ7dgRHVTSgoViIrAZAmYtF9PjN UXhNr4mzuEIICiddyjMTsSbBbeokmDeOTi0NiwJKDmR+41ovE3iMV0yCGAKCD5rnvuy8 udSg== 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:in-reply-to :references; bh=yLDZ+cjBZ6qPwW4Z903uGIY2eDUZlttE+u2kJ3p3j/o=; b=tE/nJ1NuSHPQNvVLDkNUzk4Rk5FCrk92yBKeu+BZIrmBex2zU0vuRnp6ErlsT2ClCL tmPbP7sGpNxLIBwo2qJob8Ji/KotJL/vKuyK2sPp90PPKX3TrWSKH4Sk2p4by/bZvjQs 1kI6TahxaDs3dERcneG80wG8avK02hgyPwA8wJ4SdGD4UR33l13wBtgjKmx4RiRshsYW pXzidDUjToSRDiHqthn6wyHbf/yDFvMgwGQiLQsj4nOxV6un2pcWuFK4/r0GeZt5akBX eIG51glkP5M2LJu02CH07Fa9uCop72B59Kb8AZBHYmEvxaP2kHh/j9xBWQ/hMtFFnE3j te/Q== X-Gm-Message-State: ALKqPwcw6P7CbXHMbxs0aQEbIO6tTll30yLLawowl82M7C0FTNE7WH+d 1B1aX/75h8OHO7VLaNC32q76ohA5 X-Received: by 2002:adf:e542:: with SMTP id z2-v6mr11391293wrm.111.1527934337277; Sat, 02 Jun 2018 03:12:17 -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 b16-v6sm38624797wrm.89.2018.06.02.03.12.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Jun 2018 03:12:16 -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 v3 03/10] mfd: da9063: Rename PMIC_DA9063 to PMIC_CHIP_ID_DA9063 Date: Sat, 2 Jun 2018 12:11:48 +0200 Message-Id: <20180602101155.26375-3-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180602101155.26375-1-marek.vasut+renesas@gmail.com> References: <20180602101155.26375-1-marek.vasut+renesas@gmail.com> 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 Acked-by: Mark Brown Reviewed-by: Geert Uytterhoeven --- V2: No change V3: No change --- 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 8226ebd8b96d..fb122316c421 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