Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1276286 > unrolled thread

[PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via properties

Started byAndy Shevchenko <andriy.shevchenko@linux.intel.com>
First post2015-11-24 11:30 +0100
Last post2015-11-25 13:20 +0100
Articles 5 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via properties Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-11-24 11:30 +0100
    Re: [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via  properties kbuild test robot <lkp@intel.com> - 2015-11-24 11:50 +0100
      Re: [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via  properties Mika Westerberg <mika.westerberg@linux.intel.com> - 2015-11-24 12:20 +0100
    Re: [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via properties Arnd Bergmann <arnd@arndb.de> - 2015-11-24 21:00 +0100
      Re: [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via  properties Mika Westerberg <mika.westerberg@linux.intel.com> - 2015-11-25 13:20 +0100

#1276286 — [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via properties

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2015-11-24 11:30 +0100
Subject[PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via properties
Message-ID<qyj1h-6Rp-51@gated-at.bofh.it>
From: Mika Westerberg <mika.westerberg@linux.intel.com>

The HS-UART host controller driver needs to know certain properties like
width of the register set if it cannot get that information from ACPI or
DT. In order to support non-ACPI systems we pass this information to the
driver via device properties.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel-lpss-pci.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
index 5bfdfcc..74f0d6d 100644
--- a/drivers/mfd/intel-lpss-pci.c
+++ b/drivers/mfd/intel-lpss-pci.c
@@ -65,9 +65,21 @@ static const struct intel_lpss_platform_info spt_info = {
 	.clk_rate = 120000000,
 };
 
+static struct property_entry uart_properties[] = {
+	PROPERTY_ENTRY_U32("reg-io-width", 4),
+	PROPERTY_ENTRY_U32("reg-shift", 2),
+	PROPERTY_ENTRY_U8("snps,uart-16550-compatible", 1),
+	{ },
+};
+
+static struct property_set uart_pset = {
+	.properties = uart_properties,
+};
+
 static const struct intel_lpss_platform_info spt_uart_info = {
 	.clk_rate = 120000000,
 	.clk_con_id = "baudclk",
+	.pset = &uart_pset,
 };
 
 static const struct intel_lpss_platform_info bxt_info = {
@@ -77,6 +89,7 @@ static const struct intel_lpss_platform_info bxt_info = {
 static const struct intel_lpss_platform_info bxt_uart_info = {
 	.clk_rate = 100000000,
 	.clk_con_id = "baudclk",
+	.pset = &uart_pset,
 };
 
 static const struct intel_lpss_platform_info bxt_i2c_info = {
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1276310 — Re: [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via properties

Fromkbuild test robot <lkp@intel.com>
Date2015-11-24 11:50 +0100
SubjectRe: [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via properties
Message-ID<qyjkB-6ZF-3@gated-at.bofh.it>
In reply to#1276286

[Multipart message — attachments visible in raw view] — view raw

Hi Mika,

[auto build test ERROR on v4.4-rc2]
[also build test ERROR on next-20151124]
[cannot apply to ljones-mfd/for-mfd-next]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/device-property-always-check-for-fwnode-type/20151124-183221
config: x86_64-randconfig-x019-11241713 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

>> drivers/mfd/intel-lpss-pci.c:68:30: error: array type has incomplete element type 'struct property_entry'
    static struct property_entry uart_properties[] = {
                                 ^
>> drivers/mfd/intel-lpss-pci.c:69:2: error: implicit declaration of function 'PROPERTY_ENTRY_U32' [-Werror=implicit-function-declaration]
     PROPERTY_ENTRY_U32("reg-io-width", 4),
     ^
>> drivers/mfd/intel-lpss-pci.c:71:2: error: implicit declaration of function 'PROPERTY_ENTRY_U8' [-Werror=implicit-function-declaration]
     PROPERTY_ENTRY_U8("snps,uart-16550-compatible", 1),
     ^
>> drivers/mfd/intel-lpss-pci.c:75:15: error: variable 'uart_pset' has initializer but incomplete type
    static struct property_set uart_pset = {
                  ^
>> drivers/mfd/intel-lpss-pci.c:76:2: error: unknown field 'properties' specified in initializer
     .properties = uart_properties,
     ^
>> drivers/mfd/intel-lpss-pci.c:76:16: warning: excess elements in struct initializer
     .properties = uart_properties,
                   ^
   drivers/mfd/intel-lpss-pci.c:76:16: note: (near initialization for 'uart_pset')
>> drivers/mfd/intel-lpss-pci.c:68:30: warning: 'uart_properties' defined but not used [-Wunused-variable]
    static struct property_entry uart_properties[] = {
                                 ^
   cc1: some warnings being treated as errors

vim +68 drivers/mfd/intel-lpss-pci.c

    62	static INTEL_LPSS_PM_OPS(intel_lpss_pci_pm_ops);
    63	
    64	static const struct intel_lpss_platform_info spt_info = {
    65		.clk_rate = 120000000,
    66	};
    67	
  > 68	static struct property_entry uart_properties[] = {
  > 69		PROPERTY_ENTRY_U32("reg-io-width", 4),
    70		PROPERTY_ENTRY_U32("reg-shift", 2),
  > 71		PROPERTY_ENTRY_U8("snps,uart-16550-compatible", 1),
    72		{ },
    73	};
    74	
  > 75	static struct property_set uart_pset = {
  > 76		.properties = uart_properties,
    77	};
    78	
    79	static const struct intel_lpss_platform_info spt_uart_info = {

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1276334 — Re: [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via properties

FromMika Westerberg <mika.westerberg@linux.intel.com>
Date2015-11-24 12:20 +0100
SubjectRe: [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via properties
Message-ID<qyjND-7oT-3@gated-at.bofh.it>
In reply to#1276310
On Tue, Nov 24, 2015 at 06:44:53PM +0800, kbuild test robot wrote:
> Hi Mika,
> 
> [auto build test ERROR on v4.4-rc2]
> [also build test ERROR on next-20151124]
> [cannot apply to ljones-mfd/for-mfd-next]
> 
> url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/device-property-always-check-for-fwnode-type/20151124-183221
> config: x86_64-randconfig-x019-11241713 (attached as .config)
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All error/warnings (new ones prefixed by >>):
> 
> >> drivers/mfd/intel-lpss-pci.c:68:30: error: array type has incomplete element type 'struct property_entry'
>     static struct property_entry uart_properties[] = {

Thanks kbuild robot!

This patch misses include of <linux/property.h>. It seems that it got
added by a subsequent patch which was not sent out.

We will fix this.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1276732

FromArnd Bergmann <arnd@arndb.de>
Date2015-11-24 21:00 +0100
Message-ID<qyrUS-43K-13@gated-at.bofh.it>
In reply to#1276286
On Tuesday 24 November 2015 12:22:57 Andy Shevchenko wrote:
> +static struct property_entry uart_properties[] = {
> +       PROPERTY_ENTRY_U32("reg-io-width", 4),
> +       PROPERTY_ENTRY_U32("reg-shift", 2),
> +       PROPERTY_ENTRY_U8("snps,uart-16550-compatible", 1),
> +       { },
> 

If I read the binding correctly, the "snps,uart-16550-compatible" property
is meant to be boolean, meaning true if present and zero-length or false
if absent. Using a u8 propert instead feels wrong.

Maybe we can have a PROPERTY_ENTRY_BOOL() for that?

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1277309 — Re: [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via properties

FromMika Westerberg <mika.westerberg@linux.intel.com>
Date2015-11-25 13:20 +0100
SubjectRe: [PATCH v1 11/13] mfd: intel-lpss: Pass HSUART configuration via properties
Message-ID<qyHdf-6aD-7@gated-at.bofh.it>
In reply to#1276732
On Tue, Nov 24, 2015 at 08:53:04PM +0100, Arnd Bergmann wrote:
> On Tuesday 24 November 2015 12:22:57 Andy Shevchenko wrote:
> > +static struct property_entry uart_properties[] = {
> > +       PROPERTY_ENTRY_U32("reg-io-width", 4),
> > +       PROPERTY_ENTRY_U32("reg-shift", 2),
> > +       PROPERTY_ENTRY_U8("snps,uart-16550-compatible", 1),
> > +       { },
> > 
> 
> If I read the binding correctly, the "snps,uart-16550-compatible" property
> is meant to be boolean, meaning true if present and zero-length or false
> if absent. Using a u8 propert instead feels wrong.
> 
> Maybe we can have a PROPERTY_ENTRY_BOOL() for that?

That's a good idea. We'll add it to the next revision of the series.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web