All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Sekhar Nori <nsekhar@ti.com>, Arnd Bergmann <arnd@arndb.de>
Cc: <soc@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Russell King <linux@armlinux.org.uk>, Bin Liu <b-liu@ti.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ARM: davinci: fix build failure without I2C
Date: Tue, 2 Jun 2020 12:19:00 +0300	[thread overview]
Message-ID: <2499396.lGaqSPkdTl@feketebors> (raw)
In-Reply-To: <20200527133746.643895-1-arnd@arndb.de>

Hi Arnd,

On Wednesday, 27 May 2020 16.37.34 EEST Arnd Bergmann wrote:
> The two supplies are referenced outside of #ifdef CONFIG_I2C but
> defined inside, which breaks the build if that is not built-in:
> 
> mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v'
>                                      ARRAY_SIZE(fixed_supplies_1_8v), 1800000);
>                                                 ^
> mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v'
> mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v'
> mach-davinci/board-dm644x-evm.c:860:49: error: use of undeclared identifier 'fixed_supplies_1_8v'
>         regulator_register_always_on(0, "fixed-dummy", fixed_supplies_1_8v,
> 
> I don't know if the regulators are used anywhere without I2C, but
> always registering them seems to be the safe choice here.

Thanks for fixing this,
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
 
> On a related note, it might be best to also deal with CONFIG_I2C=m
> across the file, unless this is going to be moved to DT and removed
> really soon anyway.
> 
> Fixes: 5e06d19694a4 ("ARM: davinci: dm644x-evm: Add Fixed regulators needed for tlv320aic33")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-davinci/board-dm644x-evm.c | 26 ++++++++++++------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
> index 3461d12bbfc0..a5d3708fedf6 100644
> --- a/arch/arm/mach-davinci/board-dm644x-evm.c
> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c
> @@ -655,19 +655,6 @@ static struct i2c_board_info __initdata i2c_info[] =  {
>  	},
>  };
>  
> -/* Fixed regulator support */
> -static struct regulator_consumer_supply fixed_supplies_3_3v[] = {
> -	/* Baseboard 3.3V: 5V -> TPS54310PWP -> 3.3V */
> -	REGULATOR_SUPPLY("AVDD", "1-001b"),
> -	REGULATOR_SUPPLY("DRVDD", "1-001b"),
> -};
> -
> -static struct regulator_consumer_supply fixed_supplies_1_8v[] = {
> -	/* Baseboard 1.8V: 5V -> TPS54310PWP -> 1.8V */
> -	REGULATOR_SUPPLY("IOVDD", "1-001b"),
> -	REGULATOR_SUPPLY("DVDD", "1-001b"),
> -};
> -
>  #define DM644X_I2C_SDA_PIN	GPIO_TO_PIN(2, 12)
>  #define DM644X_I2C_SCL_PIN	GPIO_TO_PIN(2, 11)
>  
> @@ -700,6 +687,19 @@ static void __init evm_init_i2c(void)
>  }
>  #endif
>  
> +/* Fixed regulator support */
> +static struct regulator_consumer_supply fixed_supplies_3_3v[] = {
> +	/* Baseboard 3.3V: 5V -> TPS54310PWP -> 3.3V */
> +	REGULATOR_SUPPLY("AVDD", "1-001b"),
> +	REGULATOR_SUPPLY("DRVDD", "1-001b"),
> +};
> +
> +static struct regulator_consumer_supply fixed_supplies_1_8v[] = {
> +	/* Baseboard 1.8V: 5V -> TPS54310PWP -> 1.8V */
> +	REGULATOR_SUPPLY("IOVDD", "1-001b"),
> +	REGULATOR_SUPPLY("DVDD", "1-001b"),
> +};
> +
>  #define VENC_STD_ALL	(V4L2_STD_NTSC | V4L2_STD_PAL)
>  
>  /* venc standard timings */
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki



WARNING: multiple messages have this Message-ID (diff)
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Sekhar Nori <nsekhar@ti.com>, Arnd Bergmann <arnd@arndb.de>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Russell King <linux@armlinux.org.uk>,
	linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	soc@kernel.org, Bin Liu <b-liu@ti.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: davinci: fix build failure without I2C
Date: Tue, 2 Jun 2020 12:19:00 +0300	[thread overview]
Message-ID: <2499396.lGaqSPkdTl@feketebors> (raw)
In-Reply-To: <20200527133746.643895-1-arnd@arndb.de>

Hi Arnd,

On Wednesday, 27 May 2020 16.37.34 EEST Arnd Bergmann wrote:
> The two supplies are referenced outside of #ifdef CONFIG_I2C but
> defined inside, which breaks the build if that is not built-in:
> 
> mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v'
>                                      ARRAY_SIZE(fixed_supplies_1_8v), 1800000);
>                                                 ^
> mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v'
> mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v'
> mach-davinci/board-dm644x-evm.c:860:49: error: use of undeclared identifier 'fixed_supplies_1_8v'
>         regulator_register_always_on(0, "fixed-dummy", fixed_supplies_1_8v,
> 
> I don't know if the regulators are used anywhere without I2C, but
> always registering them seems to be the safe choice here.

Thanks for fixing this,
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
 
> On a related note, it might be best to also deal with CONFIG_I2C=m
> across the file, unless this is going to be moved to DT and removed
> really soon anyway.
> 
> Fixes: 5e06d19694a4 ("ARM: davinci: dm644x-evm: Add Fixed regulators needed for tlv320aic33")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-davinci/board-dm644x-evm.c | 26 ++++++++++++------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
> index 3461d12bbfc0..a5d3708fedf6 100644
> --- a/arch/arm/mach-davinci/board-dm644x-evm.c
> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c
> @@ -655,19 +655,6 @@ static struct i2c_board_info __initdata i2c_info[] =  {
>  	},
>  };
>  
> -/* Fixed regulator support */
> -static struct regulator_consumer_supply fixed_supplies_3_3v[] = {
> -	/* Baseboard 3.3V: 5V -> TPS54310PWP -> 3.3V */
> -	REGULATOR_SUPPLY("AVDD", "1-001b"),
> -	REGULATOR_SUPPLY("DRVDD", "1-001b"),
> -};
> -
> -static struct regulator_consumer_supply fixed_supplies_1_8v[] = {
> -	/* Baseboard 1.8V: 5V -> TPS54310PWP -> 1.8V */
> -	REGULATOR_SUPPLY("IOVDD", "1-001b"),
> -	REGULATOR_SUPPLY("DVDD", "1-001b"),
> -};
> -
>  #define DM644X_I2C_SDA_PIN	GPIO_TO_PIN(2, 12)
>  #define DM644X_I2C_SCL_PIN	GPIO_TO_PIN(2, 11)
>  
> @@ -700,6 +687,19 @@ static void __init evm_init_i2c(void)
>  }
>  #endif
>  
> +/* Fixed regulator support */
> +static struct regulator_consumer_supply fixed_supplies_3_3v[] = {
> +	/* Baseboard 3.3V: 5V -> TPS54310PWP -> 3.3V */
> +	REGULATOR_SUPPLY("AVDD", "1-001b"),
> +	REGULATOR_SUPPLY("DRVDD", "1-001b"),
> +};
> +
> +static struct regulator_consumer_supply fixed_supplies_1_8v[] = {
> +	/* Baseboard 1.8V: 5V -> TPS54310PWP -> 1.8V */
> +	REGULATOR_SUPPLY("IOVDD", "1-001b"),
> +	REGULATOR_SUPPLY("DVDD", "1-001b"),
> +};
> +
>  #define VENC_STD_ALL	(V4L2_STD_NTSC | V4L2_STD_PAL)
>  
>  /* venc standard timings */
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-06-02  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 13:37 [PATCH] ARM: davinci: fix build failure without I2C Arnd Bergmann
2020-05-27 13:37 ` Arnd Bergmann
2020-06-02  9:19 ` Peter Ujfalusi [this message]
2020-06-02  9:19   ` Peter Ujfalusi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2499396.lGaqSPkdTl@feketebors \
    --to=peter.ujfalusi@ti.com \
    --cc=arnd@arndb.de \
    --cc=b-liu@ti.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nsekhar@ti.com \
    --cc=soc@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.