staging: move greybus core out of staging
Subsystems (8)
Greg Kroah-Hartman
maintainercover staging: move greybus core out of staging
The Greybus code has long been "stable" but was living in the drivers/staging/ directory to see if there really was going to be devices using this protocol over the long-term. With the success of millions of phones with this hardware and code in it, and the recent Google Summer of Code project, and a number of of new devices in the works from various companies, it is time to finally move this code out of staging into the "real" portion of the kernel so that people know they can rely on it.
This series first does a little bit of checkpatch cleanups for some basic remaining issues in the greybus files, and then moves the include directory, the greybus core code, and the es2 greybus host controller driver into drivers/greybus.
To come after this is the movement of the Documentation entries and a number of the module drivers that are stable.
Greg Kroah-Hartman (9):
staging: greybus: fix up SPDX comment in .h files
staging: greybus: remove license "boilerplate"
staging: greybus: hd: Fix up some alignment checkpatch issues
staging: greybus: manifest: Fix up some alignment checkpatch issues
staging: greybus: log: Fix up some alignment checkpatch issues
staging: greybus: loopback: Fix up some alignment checkpatch issues
staging: greybus: move core include files to include/linux/greybus/
staging: greybus: move the greybus core to drivers/greybus
staging: greybus: move es2 to drivers/greybus/
MAINTAINERS | 3 +
drivers/Kconfig | 2 +
drivers/Makefile | 1 +
drivers/greybus/Kconfig | 32 +++++
drivers/greybus/Makefile | 26 +++++
drivers/greybus/arpc.h | 63 ++++++++++
drivers/{staging => }/greybus/bundle.c | 2 +-
drivers/{staging => }/greybus/connection.c | 2 +-
drivers/{staging => }/greybus/control.c | 2 +-
drivers/{staging => }/greybus/core.c | 2 +-
drivers/{staging => }/greybus/debugfs.c | 3 +-
drivers/{staging => }/greybus/es2.c | 3 +-
drivers/{staging => }/greybus/greybus_trace.h | 2 +-
drivers/{staging => }/greybus/hd.c | 12 +-
drivers/{staging => }/greybus/interface.c | 2 +-
drivers/{staging => }/greybus/manifest.c | 41 ++++---
drivers/{staging => }/greybus/module.c | 2 +-
drivers/{staging => }/greybus/operation.c | 2 +-
drivers/{staging => }/greybus/svc.c | 3 +-
drivers/{staging => }/greybus/svc_watchdog.c | 2 +-
.../Documentation/firmware/authenticate.c | 46 --------
.../greybus/Documentation/firmware/firmware.c | 46 --------
drivers/staging/greybus/Kconfig | 27 -----
drivers/staging/greybus/Makefile | 22 ----
drivers/staging/greybus/arche-platform.c | 2 +-
drivers/staging/greybus/arpc.h | 109 ------------------
drivers/staging/greybus/audio_apbridgea.c | 3 +-
drivers/staging/greybus/audio_apbridgea.h | 26 +----
drivers/staging/greybus/audio_codec.h | 4 +-
drivers/staging/greybus/audio_gb.c | 4 +-
drivers/staging/greybus/authentication.c | 3 +-
drivers/staging/greybus/bootrom.c | 2 +-
drivers/staging/greybus/camera.c | 2 +-
drivers/staging/greybus/firmware.h | 4 +-
drivers/staging/greybus/fw-core.c | 2 +-
drivers/staging/greybus/fw-download.c | 2 +-
drivers/staging/greybus/fw-management.c | 2 +-
drivers/staging/greybus/gb-camera.h | 2 +-
drivers/staging/greybus/gbphy.c | 2 +-
drivers/staging/greybus/gbphy.h | 2 +-
drivers/staging/greybus/gpio.c | 2 +-
.../staging/greybus/greybus_authentication.h | 48 +-------
drivers/staging/greybus/greybus_firmware.h | 48 +-------
drivers/staging/greybus/hid.c | 3 +-
drivers/staging/greybus/i2c.c | 2 +-
drivers/staging/greybus/light.c | 4 +-
drivers/staging/greybus/log.c | 9 +-
drivers/staging/greybus/loopback.c | 9 +-
drivers/staging/greybus/power_supply.c | 3 +-
drivers/staging/greybus/pwm.c | 2 +-
drivers/staging/greybus/raw.c | 3 +-
drivers/staging/greybus/sdio.c | 2 +-
drivers/staging/greybus/spi.c | 2 +-
drivers/staging/greybus/spilib.c | 2 +-
drivers/staging/greybus/spilib.h | 2 +-
drivers/staging/greybus/tools/loopback_test.c | 2 -
drivers/staging/greybus/uart.c | 2 +-
drivers/staging/greybus/usb.c | 2 +-
drivers/staging/greybus/vibrator.c | 3 +-
.../greybus => include/linux}/greybus.h | 26 ++---
.../linux}/greybus/bundle.h | 0
.../linux}/greybus/connection.h | 0
.../linux}/greybus/control.h | 0
.../linux}/greybus/greybus_id.h | 0
.../linux}/greybus/greybus_manifest.h | 2 +-
.../linux}/greybus/greybus_protocols.h | 48 +-------
.../staging => include/linux}/greybus/hd.h | 2 +-
.../linux}/greybus/interface.h | 2 +-
.../linux}/greybus/manifest.h | 2 +-
.../linux}/greybus/module.h | 2 +-
.../linux}/greybus/operation.h | 2 +-
.../staging => include/linux}/greybus/svc.h | 2 +-
72 files changed, 225 insertions(+), 532 deletions(-)
create mode 100644 drivers/greybus/Kconfig
create mode 100644 drivers/greybus/Makefile
create mode 100644 drivers/greybus/arpc.h
rename drivers/{staging => }/greybus/bundle.c (99%)
rename drivers/{staging => }/greybus/connection.c (99%)
rename drivers/{staging => }/greybus/control.c (99%)
rename drivers/{staging => }/greybus/core.c (99%)
rename drivers/{staging => }/greybus/debugfs.c (94%)
rename drivers/{staging => }/greybus/es2.c (99%)
rename drivers/{staging => }/greybus/greybus_trace.h (99%)
rename drivers/{staging => }/greybus/hd.c (96%)
rename drivers/{staging => }/greybus/interface.c (99%)
rename drivers/{staging => }/greybus/manifest.c (95%)
rename drivers/{staging => }/greybus/module.c (99%)
rename drivers/{staging => }/greybus/operation.c (99%)
rename drivers/{staging => }/greybus/svc.c (99%)
rename drivers/{staging => }/greybus/svc_watchdog.c (99%)
delete mode 100644 drivers/staging/greybus/arpc.h
rename {drivers/staging/greybus => include/linux}/greybus.h (88%)
rename {drivers/staging => include/linux}/greybus/bundle.h (100%)
rename {drivers/staging => include/linux}/greybus/connection.h (100%)
rename {drivers/staging => include/linux}/greybus/control.h (100%)
rename {drivers/staging => include/linux}/greybus/greybus_id.h (100%)
rename {drivers/staging => include/linux}/greybus/greybus_manifest.h (99%)
rename {drivers/staging => include/linux}/greybus/greybus_protocols.h (96%)
rename {drivers/staging => include/linux}/greybus/hd.h (98%)
rename {drivers/staging => include/linux}/greybus/interface.h (98%)
rename {drivers/staging => include/linux}/greybus/manifest.h (87%)
rename {drivers/staging => include/linux}/greybus/module.h (94%)
rename {drivers/staging => include/linux}/greybus/operation.h (99%)
rename {drivers/staging => include/linux}/greybus/svc.h (98%)Signature · 1 line
2.23.0
Greg Kroah-Hartman
maintainerPATCH 1/9 staging: greybus: fix up SPDX comment in .h files
When these files originally got an SPDX tag, I used // instead of /* */ for the .h files. Fix this up to use // properly.
--- drivers/staging/greybus/firmware.h | 2 +- drivers/staging/greybus/gb-camera.h | 2 +- drivers/staging/greybus/gbphy.h | 2 +- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/greybus_authentication.h | 2 +- drivers/staging/greybus/greybus_firmware.h | 2 +- drivers/staging/greybus/greybus_manifest.h | 2 +- drivers/staging/greybus/greybus_protocols.h | 2 +- drivers/staging/greybus/greybus_trace.h | 2 +- drivers/staging/greybus/hd.h | 2 +- drivers/staging/greybus/interface.h | 2 +- drivers/staging/greybus/manifest.h | 2 +- drivers/staging/greybus/module.h | 2 +- drivers/staging/greybus/operation.h | 2 +- drivers/staging/greybus/spilib.h | 2 +- drivers/staging/greybus/svc.h | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-)
drivers/staging/greybus/firmware.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus Firmware Management Header *
drivers/staging/greybus/gb-camera.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus Camera protocol driver. *
drivers/staging/greybus/gbphy.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus Bridged-Phy Bus driver *
drivers/staging/greybus/greybus.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus driver and device API *
drivers/staging/greybus/greybus_authentication.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) +/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ /* * Greybus Component Authentication User Header *
drivers/staging/greybus/greybus_firmware.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) +/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ /* * Greybus Firmware Management User Header *
drivers/staging/greybus/greybus_manifest.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus manifest definition *
drivers/staging/greybus/greybus_protocols.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) +/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ /* * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license.
drivers/staging/greybus/greybus_trace.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus driver and device API *
drivers/staging/greybus/hd.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus Host Device *
drivers/staging/greybus/interface.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus Interface Block code *
drivers/staging/greybus/manifest.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus manifest parsing *
drivers/staging/greybus/module.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus Module code *
drivers/staging/greybus/operation.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus operations *
drivers/staging/greybus/spilib.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus SPI library header *
drivers/staging/greybus/svc.h +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0 */ /* * Greybus SVC code *
Signature · 1 line
2.23.0
Greg Kroah-Hartman
maintainerPATCH 2/9 staging: greybus: remove license "boilerplate"
In reply to Greg Kroah-HartmanWhen the greybus drivers were converted to SPDX identifiers for the license text, some license boilerplate was not removed. Clean this up by removing this unneeded text now.
--- .../Documentation/firmware/authenticate.c | 46 ------------------- .../greybus/Documentation/firmware/firmware.c | 46 ------------------- drivers/staging/greybus/arpc.h | 46 ------------------- drivers/staging/greybus/audio_apbridgea.h | 26 +---------- .../staging/greybus/greybus_authentication.h | 46 ------------------- drivers/staging/greybus/greybus_firmware.h | 46 ------------------- drivers/staging/greybus/greybus_protocols.h | 46 ------------------- drivers/staging/greybus/tools/loopback_test.c | 2 - 8 files changed, 1 insertion(+), 303 deletions(-)
drivers/staging/greybus/Documentation/firmware/authenticate.c +0 -46
@@ -2,54 +2,8 @@/* * Sample code to test CAP protocol * -* This file is provided under a dual BSD/GPLv2 license. When using or -* redistributing this file, you may do so under either license. -* -* GPL LICENSE SUMMARY -* * Copyright(c) 2016 Google Inc. All rights reserved. * Copyright(c) 2016 Linaro Ltd. All rights reserved. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License version 2 for more details. -* -* BSD LICENSE -* -* Copyright(c) 2016 Google Inc. All rights reserved. -* Copyright(c) 2016 Linaro Ltd. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Google Inc. or Linaro Ltd. nor the names of -* its contributors may be used to endorse or promote products -* derived from this software without specific prior written -* permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR -* LINARO LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <stdio.h>
drivers/staging/greybus/Documentation/firmware/firmware.c +0 -46
54 lines not on this page · raw message
drivers/staging/greybus/arpc.h +0 -46
53 lines not on this page · raw message
drivers/staging/greybus/audio_apbridgea.h +1 -25
@@ -1,30 +1,6 @@/* SPDX-License-Identifier: BSD-3-Clause */ -/** +/* * Copyright (c) 2015-2016 Google Inc. -* All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* 1. Redistributions of source code must retain the above copyright notice, -* this list of conditions and the following disclaimer. -* 2. Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the following disclaimer in the documentation -* and/or other materials provided with the distribution. -* 3. Neither the name of the copyright holder nor the names of its -* contributors may be used to endorse or promote products derived from this -* software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * This is a special protocol for configuring communication over the
drivers/staging/greybus/greybus_authentication.h +0 -46
54 lines not on this page · raw message
drivers/staging/greybus/greybus_firmware.h +0 -46
54 lines not on this page · raw message
drivers/staging/greybus/greybus_protocols.h +0 -46
53 lines not on this page · raw message
drivers/staging/greybus/tools/loopback_test.c +0 -2
@@ -4,8 +4,6 @@* * Copyright 2015 Google Inc. * Copyright 2015 Linaro Ltd. -* -* Provided under the three clause BSD license found in the LICENSE file. */ #include <errno.h> #include <fcntl.h>
Signature · 1 line
2.23.0
Greg Kroah-Hartman
maintainerPATCH 3/9 staging: greybus: hd: Fix up some alignment checkpatch issues
In reply to Greg Kroah-HartmanSome function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy.
--- drivers/staging/greybus/hd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/greybus/hd.c +5 -5
@@ -31,7 +31,7 @@ int gb_hd_output(struct gb_host_device *hd, void *req, u16 size, u8 cmd,EXPORT_SYMBOL_GPL (gb_hd_output);static ssize_t bus_id_show (struct device *dev, -struct device_attribute *attr,char *buf) +struct device_attribute *attr,char *buf) {struct gb_host_device *hd =to_gb_host_device (dev);
@@ -70,7 +70,7 @@ EXPORT_SYMBOL_GPL(gb_hd_cport_release_reserved);/* Locking: Caller guarantees serialisation */ int gb_hd_cport_allocate (struct gb_host_device *hd,int cport_id, -unsigned long flags) +unsigned long flags) {struct ida *id_map = &hd->cport_id_map;int ida_start, ida_end;
@@ -122,9 +122,9 @@ struct device_type greybus_hd_type = { };struct gb_host_device *gb_hd_create (struct gb_hd_driver *driver, -struct device *parent, -size_t buffer_size_max, -size_t num_cports) +struct device *parent, +size_t buffer_size_max, +size_t num_cports) {struct gb_host_device *hd;int ret;
Signature · 1 line
2.23.0
Greg Kroah-Hartman
maintainerPATCH 4/9 staging: greybus: manifest: Fix up some alignment checkpatch issues
In reply to Greg Kroah-HartmanSome function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy.
--- drivers/staging/greybus/manifest.c | 39 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 20 deletions(-)
drivers/staging/greybus/manifest.c +19 -20
@@ -104,15 +104,15 @@ static int identify_descriptor(struct gb_interface *intf,size_t expected_size;if (size <sizeof (*desc_header)) { -dev_err (&intf->dev,"manifest too small (%zu < %zu)\n" , - size,sizeof (*desc_header)); +dev_err (&intf->dev,"manifest too small (%zu < %zu)\n" , size, +sizeof (*desc_header));return -EINVAL ;/* Must at least have header */ } desc_size =le16_to_cpu (desc_header->size);if (desc_size > size) {dev_err (&intf->dev,"descriptor too big (%zu > %zu)\n" , - desc_size, size); + desc_size, size);return -EINVAL ; }
@@ -139,22 +139,22 @@ static int identify_descriptor(struct gb_interface *intf,case GREYBUS_TYPE_INVALID :default :dev_err (&intf->dev,"invalid descriptor type (%u)\n" , - desc_header->type); + desc_header->type);return -EINVAL ; }if (desc_size < expected_size) {dev_err (&intf->dev,"%s descriptor too small (%zu < %zu)\n" , -get_descriptor_type_string (desc_header->type), - desc_size, expected_size); +get_descriptor_type_string (desc_header->type), + desc_size, expected_size);return -EINVAL ; }/* Descriptor bigger than what we expect */ if (desc_size > expected_size) {dev_warn (&intf->dev,"%s descriptor size mismatch (want %zu got %zu)\n" , -get_descriptor_type_string (desc_header->type), - expected_size, desc_size); +get_descriptor_type_string (desc_header->type), + expected_size, desc_size); } descriptor =kzalloc (sizeof (*descriptor),GFP_KERNEL );
@@ -208,7 +208,7 @@ static char *gb_string_get(struct gb_interface *intf, u8 string_id)/* Allocate an extra byte so we can guarantee it's NUL-terminated */ string =kmemdup (&desc_string->string, desc_string->length +1 , -GFP_KERNEL ); +GFP_KERNEL );if (!string)return ERR_PTR (-ENOMEM ); string[desc_string->length] ='\0' ;
@@ -264,8 +264,7 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle) desc_cport = tmp->data;if (cport_id ==le16_to_cpu (desc_cport->id)) {dev_err (&bundle->dev, -"duplicate CPort %u found\n" , - cport_id); +"duplicate CPort %u found\n" , cport_id); goto exit; } }
@@ -277,7 +276,7 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle)return 0 ; bundle->cport_desc =kcalloc (count,sizeof (*bundle->cport_desc), -GFP_KERNEL ); +GFP_KERNEL );if (!bundle->cport_desc) goto exit;
@@ -287,7 +286,7 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle)list_for_each_entry_safe (desc, next, &list, links) { desc_cport = desc->data;memcpy (&bundle->cport_desc[i++], desc_cport, -sizeof (*desc_cport)); +sizeof (*desc_cport));/* Release the cport descriptor */ release_manifest_descriptor (desc);
@@ -333,9 +332,9 @@ static u32 gb_manifest_parse_bundles(struct gb_interface *intf)/* Ignore any legacy control bundles */ if (bundle_id ==GB_CONTROL_BUNDLE_ID ) {dev_dbg (&intf->dev,"%s - ignoring control bundle\n" , - __func__); + __func__);release_cport_descriptors (&intf->manifest_descs, - bundle_id); + bundle_id);continue ; }
@@ -468,7 +467,7 @@ bool gb_manifest_parse(struct gb_interface *intf, void *data, size_t size)/* we have to have at _least_ the manifest header */ if (size <sizeof (*header)) {dev_err (&intf->dev,"short manifest (%zu < %zu)\n" , - size,sizeof (*header)); + size,sizeof (*header));return false; }
@@ -478,15 +477,15 @@ bool gb_manifest_parse(struct gb_interface *intf, void *data, size_t size) manifest_size =le16_to_cpu (header->size);if (manifest_size != size) {dev_err (&intf->dev,"manifest size mismatch (%zu != %u)\n" , - size, manifest_size); + size, manifest_size);return false; }/* Validate major/minor number */ if (header->version_major >GREYBUS_VERSION_MAJOR ) {dev_err (&intf->dev,"manifest version too new (%u.%u > %u.%u)\n" , - header->version_major, header->version_minor, -GREYBUS_VERSION_MAJOR ,GREYBUS_VERSION_MINOR ); + header->version_major, header->version_minor, +GREYBUS_VERSION_MAJOR ,GREYBUS_VERSION_MINOR );return false; }
@@ -513,7 +512,7 @@ bool gb_manifest_parse(struct gb_interface *intf, void *data, size_t size) }if (found !=1 ) {dev_err (&intf->dev,"manifest must have 1 interface descriptor (%u found)\n" , - found); + found); result = false; goto out; }
Signature · 1 line
2.23.0
Greg Kroah-Hartman
maintainerPATCH 5/9 staging: greybus: log: Fix up some alignment checkpatch issues
In reply to Greg Kroah-HartmanSome function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy.
--- drivers/staging/greybus/log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/greybus/log.c +3 -3
@@ -31,14 +31,14 @@ static int gb_log_request_handler(struct gb_operation *op)/* Verify size of payload */ if (op->request->payload_size <sizeof (*receive)) {dev_err (dev,"log request too small (%zu < %zu)\n" , - op->request->payload_size,sizeof (*receive)); + op->request->payload_size,sizeof (*receive));return -EINVAL ; } receive = op->request->payload; len =le16_to_cpu (receive->len);if (len != (op->request->payload_size -sizeof (*receive))) {dev_err (dev,"log request wrong size %d vs %zu\n" , len, - (op->request->payload_size -sizeof (*receive))); + (op->request->payload_size -sizeof (*receive)));return -EINVAL ; }if (len ==0 ) {
@@ -83,7 +83,7 @@ static int gb_log_probe(struct gb_bundle *bundle,return -ENOMEM ; connection =gb_connection_create (bundle,le16_to_cpu (cport_desc->id), - gb_log_request_handler); + gb_log_request_handler);if (IS_ERR (connection)) { retval =PTR_ERR (connection); goto error_free;
Signature · 1 line
2.23.0
Greg Kroah-Hartman
maintainerPATCH 6/9 staging: greybus: loopback: Fix up some alignment checkpatch issues
In reply to Greg Kroah-HartmanSome function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy.
--- drivers/staging/greybus/loopback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/greybus/loopback.c +2 -2
@@ -882,7 +882,7 @@ static int gb_loopback_fn(void *data) gb->type =0 ; gb->send_count =0 ;sysfs_notify (&gb->dev->kobj,NULL , -"iteration_count" ); +"iteration_count" );dev_dbg (&bundle->dev,"load test complete\n" ); }else { dev_dbg(&bundle->dev,
@@ -1054,7 +1054,7 @@ static int gb_loopback_probe(struct gb_bundle *bundle,/* Allocate kfifo */ if (kfifo_alloc (&gb->kfifo_lat, kfifo_depth *sizeof (u32), -GFP_KERNEL )) { +GFP_KERNEL )) { retval = -ENOMEM ; goto out_conn; }
Signature · 1 line
2.23.0
Greg Kroah-Hartman
maintainerPATCH 7/9 staging: greybus: move core include files to include/linux/greybus/
In reply to Greg Kroah-HartmanWith the goal of moving the core of the greybus code out of staging, the include files need to be moved to include/linux/greybus.h and include/linux/greybus/
---
drivers/staging/greybus/arche-platform.c | 2 +-
drivers/staging/greybus/audio_apbridgea.c | 3 +--
drivers/staging/greybus/audio_codec.h | 4 +---
drivers/staging/greybus/audio_gb.c | 4 +---
drivers/staging/greybus/authentication.c | 3 +--
drivers/staging/greybus/bootrom.c | 2 +-
drivers/staging/greybus/bundle.c | 2 +-
drivers/staging/greybus/camera.c | 2 +-
drivers/staging/greybus/connection.c | 2 +-
drivers/staging/greybus/control.c | 2 +-
drivers/staging/greybus/core.c | 2 +-
drivers/staging/greybus/debugfs.c | 3 +--
drivers/staging/greybus/es2.c | 3 +--
drivers/staging/greybus/firmware.h | 2 +-
drivers/staging/greybus/fw-core.c | 2 +-
drivers/staging/greybus/fw-download.c | 2 +-
drivers/staging/greybus/fw-management.c | 2 +-
drivers/staging/greybus/gbphy.c | 2 +-
drivers/staging/greybus/gpio.c | 2 +-
drivers/staging/greybus/hd.c | 2 +-
drivers/staging/greybus/hid.c | 3 +--
drivers/staging/greybus/i2c.c | 2 +-
drivers/staging/greybus/interface.c | 2 +-
drivers/staging/greybus/light.c | 4 +---
drivers/staging/greybus/log.c | 3 +--
drivers/staging/greybus/loopback.c | 5 +---
drivers/staging/greybus/manifest.c | 2 +-
drivers/staging/greybus/module.c | 2 +-
drivers/staging/greybus/operation.c | 2 +-
drivers/staging/greybus/power_supply.c | 3 +--
drivers/staging/greybus/pwm.c | 2 +-
drivers/staging/greybus/raw.c | 3 +--
drivers/staging/greybus/sdio.c | 2 +-
drivers/staging/greybus/spi.c | 2 +-
drivers/staging/greybus/spilib.c | 2 +-
drivers/staging/greybus/svc.c | 3 +--
drivers/staging/greybus/svc_watchdog.c | 2 +-
drivers/staging/greybus/uart.c | 2 +-
drivers/staging/greybus/usb.c | 2 +-
drivers/staging/greybus/vibrator.c | 3 +--
.../greybus => include/linux}/greybus.h | 24 +++++++++----------
.../linux}/greybus/bundle.h | 0
.../linux}/greybus/connection.h | 0
.../linux}/greybus/control.h | 0
.../linux}/greybus/greybus_id.h | 0
.../linux}/greybus/greybus_manifest.h | 0
.../linux}/greybus/greybus_protocols.h | 0
.../staging => include/linux}/greybus/hd.h | 0
.../linux}/greybus/interface.h | 0
.../linux}/greybus/manifest.h | 0
.../linux}/greybus/module.h | 0
.../linux}/greybus/operation.h | 0
.../staging => include/linux}/greybus/svc.h | 0
53 files changed, 52 insertions(+), 71 deletions(-)
rename {drivers/staging/greybus => include/linux}/greybus.h (89%)
rename {drivers/staging => include/linux}/greybus/bundle.h (100%)
rename {drivers/staging => include/linux}/greybus/connection.h (100%)
rename {drivers/staging => include/linux}/greybus/control.h (100%)
rename {drivers/staging => include/linux}/greybus/greybus_id.h (100%)
rename {drivers/staging => include/linux}/greybus/greybus_manifest.h (100%)
rename {drivers/staging => include/linux}/greybus/greybus_protocols.h (100%)
rename {drivers/staging => include/linux}/greybus/hd.h (100%)
rename {drivers/staging => include/linux}/greybus/interface.h (100%)
rename {drivers/staging => include/linux}/greybus/manifest.h (100%)
rename {drivers/staging => include/linux}/greybus/module.h (100%)
rename {drivers/staging => include/linux}/greybus/operation.h (100%)
rename {drivers/staging => include/linux}/greybus/svc.h (100%)drivers/staging/greybus/arche-platform.c +1 -1
@@ -19,8 +19,8 @@#include <linux/irq.h> #include <linux/suspend.h> #include <linux/time.h> +#include <linux/greybus.h> #include "arche_platform.h" -#include "greybus.h" #if IS_ENABLED (CONFIG_USB_HSIC_USB3613 )#include <linux/usb/usb3613.h>
drivers/staging/greybus/audio_apbridgea.c +1 -2
@@ -5,8 +5,7 @@* Copyright 2015-2016 Google Inc. */ -#include "greybus.h" -#include "greybus_protocols.h" +#include <linux/greybus.h> #include "audio_apbridgea.h" #include "audio_codec.h"
drivers/staging/greybus/audio_codec.h +1 -3
@@ -8,12 +8,10 @@#ifndef __LINUX_GBAUDIO_CODEC_H#define __LINUX_GBAUDIO_CODEC_H +#include <linux/greybus.h> #include <sound/soc.h> #include <sound/jack.h> -#include "greybus.h" -#include "greybus_protocols.h" -#define NAME_SIZE 32#define MAX_DAIS 2/* APB1, APB2 */
drivers/staging/greybus/audio_gb.c +1 -3
@@ -5,9 +5,7 @@* Copyright 2015-2016 Google Inc. */ -#include "greybus.h" -#include "greybus_protocols.h" -#include "operation.h" +#include <linux/greybus.h> #include "audio_codec.h" /* TODO: Split into separate calls */
drivers/staging/greybus/authentication.c +1 -2
@@ -6,8 +6,7 @@* Copyright 2016 Linaro Ltd. */ -#include "greybus.h" - +#include <linux/greybus.h> #include <linux/cdev.h> #include <linux/fs.h> #include <linux/ioctl.h>
drivers/staging/greybus/bootrom.c +1 -1
@@ -10,8 +10,8 @@#include <linux/jiffies.h> #include <linux/mutex.h> #include <linux/workqueue.h> +#include <linux/greybus.h> -#include "greybus.h" #include "firmware.h" /* Timeout, in jiffies, within which the next request must be received */
drivers/staging/greybus/bundle.c +1 -1
@@ -6,7 +6,7 @@* Copyright 2014-2015 Linaro Ltd. */ -#include "greybus.h" +#include <linux/greybus.h> #include "greybus_trace.h" static ssize_t bundle_class_show(struct device *dev,
drivers/staging/greybus/camera.c +1 -1
@@ -14,9 +14,9 @@#include <linux/string.h> #include <linux/uaccess.h> #include <linux/vmalloc.h> +#include <linux/greybus.h> #include "gb-camera.h" -#include "greybus.h" #include "greybus_protocols.h" enum gb_camera_debugs_buffer_id {
drivers/staging/greybus/connection.c +1 -1
@@ -7,8 +7,8 @@*/ #include <linux/workqueue.h> +#include <linux/greybus.h> -#include "greybus.h" #include "greybus_trace.h" #define GB_CONNECTION_CPORT_QUIESCE_TIMEOUT 1000
drivers/staging/greybus/control.c +1 -1
@@ -9,7 +9,7 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/slab.h> -#include "greybus.h" +#include <linux/greybus.h> /* Highest control-protocol version supported */ #define GB_CONTROL_VERSION_MAJOR 0
drivers/staging/greybus/core.c +1 -1
@@ -9,7 +9,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#define CREATE_TRACE_POINTS -#include "greybus.h" +#include <linux/greybus.h> #include "greybus_trace.h" #define GB_BUNDLE_AUTOSUSPEND_MS 3000
drivers/staging/greybus/debugfs.c +1 -2
@@ -7,8 +7,7 @@*/ #include <linux/debugfs.h> - -#include "greybus.h" +#include <linux/greybus.h> static struct dentry *gb_debug_root;
drivers/staging/greybus/es2.c +1 -2
@@ -11,12 +11,11 @@#include <linux/kfifo.h> #include <linux/debugfs.h> #include <linux/list.h> +#include <linux/greybus.h> #include <asm/unaligned.h> #include "arpc.h" -#include "greybus.h" #include "greybus_trace.h" -#include "connection.h" /* Default timeout for USB vendor requests. */
drivers/staging/greybus/firmware.h +1 -1
@@ -9,7 +9,7 @@#ifndef __FIRMWARE_H#define __FIRMWARE_H -#include "greybus.h" +#include <linux/greybus.h> #define FW_NAME_PREFIX "gmp_"
drivers/staging/greybus/fw-core.c +1 -1
@@ -8,8 +8,8 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/firmware.h> +#include <linux/greybus.h> #include "firmware.h" -#include "greybus.h" #include "spilib.h" struct gb_fw_core {
drivers/staging/greybus/fw-download.c +1 -1
@@ -10,8 +10,8 @@#include <linux/jiffies.h> #include <linux/mutex.h> #include <linux/workqueue.h> +#include <linux/greybus.h> #include "firmware.h" -#include "greybus.h" /* Estimated minimum buffer size, actual size can be smaller than this */ #define MIN_FETCH_SIZE 512
drivers/staging/greybus/fw-management.c +1 -1
@@ -13,10 +13,10 @@#include <linux/idr.h> #include <linux/ioctl.h> #include <linux/uaccess.h> +#include <linux/greybus.h> #include "firmware.h" #include "greybus_firmware.h" -#include "greybus.h" #define FW_MGMT_TIMEOUT_MS 1000
drivers/staging/greybus/gbphy.c +1 -1
@@ -13,8 +13,8 @@#include <linux/kernel.h> #include <linux/slab.h> #include <linux/device.h> +#include <linux/greybus.h> -#include "greybus.h" #include "gbphy.h" #define GB_GBPHY_AUTOSUSPEND_MS 3000
drivers/staging/greybus/gpio.c +1 -1
@@ -13,8 +13,8 @@#include <linux/irqdomain.h> #include <linux/gpio/driver.h> #include <linux/mutex.h> +#include <linux/greybus.h> -#include "greybus.h" #include "gbphy.h" struct gb_gpio_line {
drivers/staging/greybus/hd.c +1 -1
@@ -8,8 +8,8 @@#include <linux/kernel.h> #include <linux/slab.h> +#include <linux/greybus.h> -#include "greybus.h" #include "greybus_trace.h" EXPORT_TRACEPOINT_SYMBOL_GPL (gb_hd_create);
drivers/staging/greybus/hid.c +1 -2
@@ -12,8 +12,7 @@#include <linux/module.h> #include <linux/mutex.h> #include <linux/slab.h> - -#include "greybus.h" +#include <linux/greybus.h> /* Greybus HID device's structure */ struct gb_hid {
drivers/staging/greybus/i2c.c +1 -1
@@ -10,8 +10,8 @@#include <linux/module.h> #include <linux/slab.h> #include <linux/i2c.h> +#include <linux/greybus.h> -#include "greybus.h" #include "gbphy.h" struct gb_i2c_device {
drivers/staging/greybus/interface.c +1 -1
@@ -7,8 +7,8 @@*/ #include <linux/delay.h> +#include <linux/greybus.h> -#include "greybus.h" #include "greybus_trace.h" #define GB_INTERFACE_MODE_SWITCH_TIMEOUT 2000
drivers/staging/greybus/light.c +1 -3
@@ -11,11 +11,9 @@#include <linux/led-class-flash.h> #include <linux/module.h> #include <linux/slab.h> +#include <linux/greybus.h> #include <media/v4l2-flash-led-class.h> -#include "greybus.h" -#include "greybus_protocols.h" -#define NAMES_MAX 32struct gb_channel {
drivers/staging/greybus/log.c +1 -2
@@ -9,8 +9,7 @@#include <linux/slab.h> #include <linux/sizes.h> #include <linux/uaccess.h> - -#include "greybus.h" +#include <linux/greybus.h> struct gb_log {struct gb_connection *connection;
drivers/staging/greybus/loopback.c +1 -4
@@ -25,12 +25,9 @@#include <linux/workqueue.h> #include <linux/atomic.h> #include <linux/pm_runtime.h> - +#include <linux/greybus.h> #include <asm/div64.h> -#include "greybus.h" -#include "connection.h" -#define NSEC_PER_DAY 86400000000000ULLstruct gb_loopback_stats {
drivers/staging/greybus/manifest.c +1 -1
@@ -6,7 +6,7 @@* Copyright 2014-2015 Linaro Ltd. */ -#include "greybus.h" +#include <linux/greybus.h> static const char *get_descriptor_type_string (u8 type) {
drivers/staging/greybus/module.c +1 -1
@@ -6,7 +6,7 @@* Copyright 2016 Linaro Ltd. */ -#include "greybus.h" +#include <linux/greybus.h> #include "greybus_trace.h" static ssize_t eject_store(struct device *dev,
drivers/staging/greybus/operation.c +1 -1
@@ -12,8 +12,8 @@#include <linux/sched.h> #include <linux/wait.h> #include <linux/workqueue.h> +#include <linux/greybus.h> -#include "greybus.h" #include "greybus_trace.h" static struct kmem_cache *gb_operation_cache;
drivers/staging/greybus/power_supply.c +1 -2
@@ -10,8 +10,7 @@#include <linux/module.h> #include <linux/power_supply.h> #include <linux/slab.h> - -#include "greybus.h" +#include <linux/greybus.h> #define PROP_MAX 32
drivers/staging/greybus/pwm.c +1 -1
@@ -10,8 +10,8 @@#include <linux/module.h> #include <linux/slab.h> #include <linux/pwm.h> +#include <linux/greybus.h> -#include "greybus.h" #include "gbphy.h" struct gb_pwm_chip {
drivers/staging/greybus/raw.c +1 -2
@@ -13,8 +13,7 @@#include <linux/fs.h> #include <linux/idr.h> #include <linux/uaccess.h> - -#include "greybus.h" +#include <linux/greybus.h> struct gb_raw {struct gb_connection *connection;
drivers/staging/greybus/sdio.c +1 -1
@@ -12,8 +12,8 @@#include <linux/mmc/mmc.h> #include <linux/scatterlist.h> #include <linux/workqueue.h> +#include <linux/greybus.h> -#include "greybus.h" #include "gbphy.h" struct gb_sdio_host {
drivers/staging/greybus/spi.c +1 -1
@@ -7,8 +7,8 @@*/ #include <linux/module.h> +#include <linux/greybus.h> -#include "greybus.h" #include "gbphy.h" #include "spilib.h"
drivers/staging/greybus/spilib.c +1 -1
@@ -10,9 +10,9 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/slab.h> +#include <linux/greybus.h> #include <linux/spi/spi.h> -#include "greybus.h" #include "spilib.h" struct gb_spilib {
drivers/staging/greybus/svc.c +1 -2
@@ -8,8 +8,7 @@#include <linux/debugfs.h> #include <linux/workqueue.h> - -#include "greybus.h" +#include <linux/greybus.h> #define SVC_INTF_EJECT_TIMEOUT 9000#define SVC_INTF_ACTIVATE_TIMEOUT 6000
drivers/staging/greybus/svc_watchdog.c +1 -1
@@ -8,7 +8,7 @@#include <linux/delay.h> #include <linux/suspend.h> #include <linux/workqueue.h> -#include "greybus.h" +#include <linux/greybus.h> #define SVC_WATCHDOG_PERIOD (2 * HZ)
drivers/staging/greybus/uart.c +1 -1
@@ -28,8 +28,8 @@#include <linux/kfifo.h> #include <linux/workqueue.h> #include <linux/completion.h> +#include <linux/greybus.h> -#include "greybus.h" #include "gbphy.h" #define GB_NUM_MINORS 16/* 16 is more than enough */
drivers/staging/greybus/usb.c +1 -1
@@ -10,8 +10,8 @@#include <linux/slab.h> #include <linux/usb.h> #include <linux/usb/hcd.h> +#include <linux/greybus.h> -#include "greybus.h" #include "gbphy.h" /* Greybus USB request types */
drivers/staging/greybus/vibrator.c +1 -2
@@ -13,8 +13,7 @@#include <linux/kdev_t.h> #include <linux/idr.h> #include <linux/pm_runtime.h> - -#include "greybus.h" +#include <linux/greybus.h> struct gb_vibrator_device {struct gb_connection *connection;
include/linux/greybus.h renamed from drivers/staging/greybus/greybus.h +12 -12
@@ -20,18 +20,18 @@#include <linux/pm_runtime.h> #include <linux/idr.h> -#include "greybus_id.h" -#include "greybus_manifest.h" -#include "greybus_protocols.h" -#include "manifest.h" -#include "hd.h" -#include "svc.h" -#include "control.h" -#include "module.h" -#include "interface.h" -#include "bundle.h" -#include "connection.h" -#include "operation.h" +#include <linux/greybus/greybus_id.h> +#include <linux/greybus/greybus_manifest.h> +#include <linux/greybus/greybus_protocols.h> +#include <linux/greybus/manifest.h> +#include <linux/greybus/hd.h> +#include <linux/greybus/svc.h> +#include <linux/greybus/control.h> +#include <linux/greybus/module.h> +#include <linux/greybus/interface.h> +#include <linux/greybus/bundle.h> +#include <linux/greybus/connection.h> +#include <linux/greybus/operation.h> /* Matches up with the Greybus Protocol specification document */ #define GREYBUS_VERSION_MAJOR 0x00
include/linux/greybus/bundle.h renamed from drivers/staging/greybus/bundle.h +0 -0
include/linux/greybus/connection.h renamed from drivers/staging/greybus/connection.h +0 -0
include/linux/greybus/control.h renamed from drivers/staging/greybus/control.h +0 -0
include/linux/greybus/greybus_id.h renamed from drivers/staging/greybus/greybus_id.h +0 -0
include/linux/greybus/greybus_manifest.h renamed from drivers/staging/greybus/greybus_manifest.h +0 -0
include/linux/greybus/greybus_protocols.h renamed from drivers/staging/greybus/greybus_protocols.h +0 -0
include/linux/greybus/hd.h renamed from drivers/staging/greybus/hd.h +0 -0
include/linux/greybus/interface.h renamed from drivers/staging/greybus/interface.h +0 -0
include/linux/greybus/manifest.h renamed from drivers/staging/greybus/manifest.h +0 -0
include/linux/greybus/module.h renamed from drivers/staging/greybus/module.h +0 -0
include/linux/greybus/operation.h renamed from drivers/staging/greybus/operation.h +0 -0
include/linux/greybus/svc.h renamed from drivers/staging/greybus/svc.h +0 -0
Signature · 1 line
2.23.0
Greg Kroah-Hartman
maintainerPATCH 8/9 staging: greybus: move the greybus core to drivers/greybus
In reply to Greg Kroah-HartmanThe Greybus core code has been stable for a long time, and has been shipping for many years in millions of phones. With the advent of a recent Google Summer of Code project, and a number of new devices in the works from various companies, it is time to get the core greybus code out of staging as it really is going to be with us for a while.
---
MAINTAINERS | 3 +++
drivers/Kconfig | 2 ++
drivers/Makefile | 1 +
drivers/greybus/Kconfig | 16 ++++++++++++++++
drivers/greybus/Makefile | 19 +++++++++++++++++++
drivers/{staging => }/greybus/bundle.c | 0
drivers/{staging => }/greybus/connection.c | 0
drivers/{staging => }/greybus/control.c | 0
drivers/{staging => }/greybus/core.c | 0
drivers/{staging => }/greybus/debugfs.c | 0
drivers/{staging => }/greybus/greybus_trace.h | 0
drivers/{staging => }/greybus/hd.c | 0
drivers/{staging => }/greybus/interface.c | 0
drivers/{staging => }/greybus/manifest.c | 0
drivers/{staging => }/greybus/module.c | 0
drivers/{staging => }/greybus/operation.c | 0
drivers/{staging => }/greybus/svc.c | 0
drivers/{staging => }/greybus/svc_watchdog.c | 0
drivers/staging/greybus/Kconfig | 16 ----------------
drivers/staging/greybus/Makefile | 17 -----------------
drivers/staging/greybus/es2.c | 2 +-
21 files changed, 42 insertions(+), 34 deletions(-)
create mode 100644 drivers/greybus/Kconfig
create mode 100644 drivers/greybus/Makefile
rename drivers/{staging => }/greybus/bundle.c (100%)
rename drivers/{staging => }/greybus/connection.c (100%)
rename drivers/{staging => }/greybus/control.c (100%)
rename drivers/{staging => }/greybus/core.c (100%)
rename drivers/{staging => }/greybus/debugfs.c (100%)
rename drivers/{staging => }/greybus/greybus_trace.h (100%)
rename drivers/{staging => }/greybus/hd.c (100%)
rename drivers/{staging => }/greybus/interface.c (100%)
rename drivers/{staging => }/greybus/manifest.c (100%)
rename drivers/{staging => }/greybus/module.c (100%)
rename drivers/{staging => }/greybus/operation.c (100%)
rename drivers/{staging => }/greybus/svc.c (100%)
rename drivers/{staging => }/greybus/svc_watchdog.c (100%)MAINTAINERS +3 -0
@@ -7003,6 +7003,9 @@ M: Alex Elder <[email protected]> M: Greg Kroah-Hartman <[email protected]> S: Maintained F: drivers/staging/greybus/ +F: drivers/greybus/ +F: include/linux/greybus.h +F: include/linux/greybus/ L: [email protected] (moderated for non-subscribers) GREYBUS UART PROTOCOLS DRIVERS
drivers/Kconfig +2 -0
@@ -146,6 +146,8 @@ source "drivers/hv/Kconfig" source "drivers/xen/Kconfig" +source "drivers/greybus/Kconfig" + source "drivers/staging/Kconfig" source "drivers/platform/Kconfig"
drivers/Makefile +1 -0
@@ -148,6 +148,7 @@ obj-$(CONFIG_BCMA) += bcma/ obj-$(CONFIG_VHOST_RING) += vhost/ obj-$(CONFIG_VHOST) += vhost/ obj-$(CONFIG_VLYNQ) += vlynq/ +obj-$(CONFIG_GREYBUS) += greybus/ obj-$(CONFIG_STAGING) += staging/ obj-y += platform/
drivers/greybus/Kconfig new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0 +menuconfig GREYBUS + tristate "Greybus support" + depends on SYSFS + ---help--- + This option enables the Greybus driver core. Greybus is an + hardware protocol that was designed to provide Unipro with a + sane application layer. It was originally designed for the + ARA project, a module phone system, but has shown up in other + phones, and can be tunneled over other busses in order to + control hardware devices. + + Say Y here to enable support for these types of drivers. + + To compile this code as a module, chose M here: the module + will be called greybus.ko
drivers/greybus/Makefile new file +19 -0
@@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-2.0 +# Greybus core +greybus-y := core.o \ + debugfs.o \ + hd.o \ + manifest.o \ + module.o \ + interface.o \ + bundle.o \ + connection.o \ + control.o \ + svc.o \ + svc_watchdog.o \ + operation.o + +obj-$(CONFIG_GREYBUS) += greybus.o + +# needed for trace events +ccflags-y += -I$(src)
drivers/greybus/bundle.c renamed from drivers/staging/greybus/bundle.c +0 -0
drivers/greybus/connection.c renamed from drivers/staging/greybus/connection.c +0 -0
drivers/greybus/control.c renamed from drivers/staging/greybus/control.c +0 -0
drivers/greybus/core.c renamed from drivers/staging/greybus/core.c +0 -0
drivers/greybus/debugfs.c renamed from drivers/staging/greybus/debugfs.c +0 -0
drivers/greybus/greybus_trace.h renamed from drivers/staging/greybus/greybus_trace.h +0 -0
drivers/greybus/hd.c renamed from drivers/staging/greybus/hd.c +0 -0
drivers/greybus/interface.c renamed from drivers/staging/greybus/interface.c +0 -0
drivers/greybus/manifest.c renamed from drivers/staging/greybus/manifest.c +0 -0
drivers/greybus/module.c renamed from drivers/staging/greybus/module.c +0 -0
drivers/greybus/operation.c renamed from drivers/staging/greybus/operation.c +0 -0
drivers/greybus/svc.c renamed from drivers/staging/greybus/svc.c +0 -0
drivers/greybus/svc_watchdog.c renamed from drivers/staging/greybus/svc_watchdog.c +0 -0
drivers/staging/greybus/Kconfig +0 -16
@@ -1,20 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -menuconfig GREYBUS - tristate "Greybus support" - depends on SYSFS - ---help--- - This option enables the Greybus driver core. Greybus is an - hardware protocol that was designed to provide Unipro with a - sane application layer. It was originally designed for the - ARA project, a module phone system, but has shown up in other - phones, and can be tunneled over other busses in order to - control hardware devices. - - Say Y here to enable support for these types of drivers. - - To compile this code as a module, chose M here: the module - will be called greybus.ko - if GREYBUS config GREYBUS_ES2
drivers/staging/greybus/Makefile +0 -17
@@ -1,24 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 -# Greybus core -greybus-y := core.o \ - debugfs.o \ - hd.o \ - manifest.o \ - module.o \ - interface.o \ - bundle.o \ - connection.o \ - control.o \ - svc.o \ - svc_watchdog.o \ - operation.o - -obj-$(CONFIG_GREYBUS) += greybus.o - # needed for trace events ccflags-y += -I$(src) - # Greybus Host controller drivers gb-es2-y := es2.o
drivers/staging/greybus/es2.c +1 -1
@@ -15,7 +15,7 @@#include <asm/unaligned.h> #include "arpc.h" -#include "greybus_trace.h" +#include "../../greybus/greybus_trace.h" /* Default timeout for USB vendor requests. */
Signature · 1 line
2.23.0
Greg Kroah-Hartman
maintainerPATCH 9/9 staging: greybus: move es2 to drivers/greybus/
In reply to Greg Kroah-HartmanThe es2 Greybus host controller has long been stable, so move it out of drivers/staging/ to drivers/greybus/
---
drivers/greybus/Kconfig | 16 ++++++++++++++++
drivers/greybus/Makefile | 7 +++++++
drivers/{staging => }/greybus/arpc.h | 0
drivers/{staging => }/greybus/es2.c | 2 +-
drivers/staging/greybus/Kconfig | 11 -----------
drivers/staging/greybus/Makefile | 5 -----
6 files changed, 24 insertions(+), 17 deletions(-)
rename drivers/{staging => }/greybus/arpc.h (100%)
rename drivers/{staging => }/greybus/es2.c (99%)drivers/greybus/Kconfig +16 -0
@@ -14,3 +14,19 @@ menuconfig GREYBUS To compile this code as a module, chose M here: the module will be called greybus.ko + +if GREYBUS + +config GREYBUS_ES2 + tristate "Greybus ES3 USB host controller" + depends on USB + ---help--- + Select this option if you have a Toshiba ES3 USB device that + acts as a Greybus "host controller". This device is a bridge + from a USB device to a Unipro network. + + To compile this code as a module, chose M here: the module + will be called gb-es2.ko + +endif # GREYBUS +
drivers/greybus/Makefile +7 -0
@@ -17,3 +17,10 @@ obj-$(CONFIG_GREYBUS) += greybus.o # needed for trace events ccflags-y += -I$(src) + +# Greybus Host controller drivers +gb-es2-y := es2.o + +obj-$(CONFIG_GREYBUS_ES2) += gb-es2.o + +
drivers/greybus/arpc.h renamed from drivers/staging/greybus/arpc.h +0 -0
drivers/greybus/es2.c renamed from drivers/staging/greybus/es2.c +1 -1
@@ -15,7 +15,7 @@#include <asm/unaligned.h> #include "arpc.h" -#include "../../greybus/greybus_trace.h" +#include "greybus_trace.h" /* Default timeout for USB vendor requests. */
drivers/staging/greybus/Kconfig +0 -11
@@ -1,17 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 if GREYBUS -config GREYBUS_ES2 - tristate "Greybus ES3 USB host controller" - depends on USB - ---help--- - Select this option if you have a Toshiba ES3 USB device that - acts as a Greybus "host controller". This device is a bridge - from a USB device to a Unipro network. - - To compile this code as a module, chose M here: the module - will be called gb-es2.ko - config GREYBUS_AUDIO tristate "Greybus Audio Class driver" depends on SOUND
drivers/staging/greybus/Makefile +0 -5
@@ -2,11 +2,6 @@ # needed for trace events ccflags-y += -I$(src) -# Greybus Host controller drivers -gb-es2-y := es2.o - -obj-$(CONFIG_GREYBUS_ES2) += gb-es2.o - # Greybus class drivers gb-bootrom-y := bootrom.o gb-camera-y := camera.o
Signature · 1 line
2.23.0
Re: [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files
In reply to Greg Kroah-HartmanQuoted 19 lines · Greg Kroah-Hartman
When these files originally got an SPDX tag, I used // instead of /* */ for the .h files. Fix this up to use // properly.
Cc Viresh Kumar <[email protected]>Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/staging/greybus/firmware.h | 2 +- drivers/staging/greybus/gb-camera.h | 2 +- drivers/staging/greybus/gbphy.h | 2 +- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/greybus_authentication.h | 2 +- drivers/staging/greybus/greybus_firmware.h | 2 +- drivers/staging/greybus/greybus_manifest.h | 2 +- drivers/staging/greybus/greybus_protocols.h | 2 +- drivers/staging/greybus/greybus_trace.h | 2 +-
Quoted 8 lines
drivers/staging/greybus/hd.h | 2 +- drivers/staging/greybus/interface.h | 2 +- drivers/staging/greybus/manifest.h | 2 +- drivers/staging/greybus/module.h | 2 +- drivers/staging/greybus/operation.h | 2 +- drivers/staging/greybus/spilib.h | 2 +- drivers/staging/greybus/svc.h | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-)
Signature · 1 line
viresh
Re: [PATCH 2/9] staging: greybus: remove license "boilerplate"
In reply to Greg Kroah-HartmanQuoted 13 lines · Greg Kroah-Hartman
When the greybus drivers were converted to SPDX identifiers for the license text, some license boilerplate was not removed. Clean this up by removing this unneeded text now.
Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Cc Vaibhav Agarwal <[email protected]>Cc Mark Greer <[email protected]>Cc Viresh Kumar <[email protected]>Cc "Bryan O'Donoghue" <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Quoted 10 lines
--- .../Documentation/firmware/authenticate.c | 46 ------------------- .../greybus/Documentation/firmware/firmware.c | 46 ------------------- drivers/staging/greybus/arpc.h | 46 ------------------- drivers/staging/greybus/audio_apbridgea.h | 26 +---------- .../staging/greybus/greybus_authentication.h | 46 ------------------- drivers/staging/greybus/greybus_firmware.h | 46 ------------------- drivers/staging/greybus/greybus_protocols.h | 46 ------------------- drivers/staging/greybus/tools/loopback_test.c | 2 - 8 files changed, 1 insertion(+), 303 deletions(-)
Signature · 1 line
viresh
Re: [PATCH 7/9] staging: greybus: move core include files to include/linux/greybus/
In reply to Greg Kroah-HartmanQuoted 4 lines · Greg Kroah-Hartman
With the goal of moving the core of the greybus code out of staging, the include files need to be moved to
include/linux/greybus.handinclude/linux/greybus/
Quoted 12 lines
Cc Vaibhav Hiremath <[email protected]>Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Cc Vaibhav Agarwal <[email protected]>Cc Mark Greer <[email protected]>Cc Viresh Kumar <[email protected]>Cc Rui Miguel Silva <[email protected]>Cc David Lin <[email protected]>Cc "Bryan O'Donoghue" <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Signature · 1 line
viresh
Re: [greybus-dev] [PATCH 3/9] staging: greybus: hd: Fix up some alignment checkpatch issues
In reply to Greg Kroah-HartmanQuoted 11 lines · Greg Kroah-Hartman
Some function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy.
Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/staging/greybus/hd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
viresh
Re: [greybus-dev] [PATCH 4/9] staging: greybus: manifest: Fix up some alignment checkpatch issues
In reply to Greg Kroah-HartmanQuoted 17 lines · Greg Kroah-Hartman
Some function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy.
Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/staging/greybus/manifest.c | 39 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 20 deletions(-)drivers/staging/greybus/manifest.c +0
-0
drivers/staging/greybus/manifest.c static int identify_descriptor(struct gb_interface *intf, · line 110
Quoted 9 lines
drivers/staging/greybus/manifest.c +2
-2@@ -104,15 +104,15 @@ static int identify_descriptor(struct gb_interface *intf,size_t expected_size;if (size <sizeof (*desc_header)) { -dev_err (&intf->dev,"manifest too small (%zu < %zu)\n" , - size,sizeof (*desc_header)); +dev_err (&intf->dev,"manifest too small (%zu < %zu)\n" , size, +sizeof (*desc_header));return -EINVAL ;/* Must at least have header */ }
Signature · 1 line
viresh
Re: [greybus-dev] [PATCH 5/9] staging: greybus: log: Fix up some alignment checkpatch issues
In reply to Greg Kroah-HartmanQuoted 35 lines · Greg Kroah-Hartman
Some function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy.
Cc David Lin <[email protected]>Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/staging/greybus/log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/greybus/log.c +2
-2@@ -31,14 +31,14 @@ static int gb_log_request_handler(struct gb_operation *op)/* Verify size of payload */ if (op->request->payload_size <sizeof (*receive)) {dev_err (dev,"log request too small (%zu < %zu)\n" , - op->request->payload_size,sizeof (*receive)); + op->request->payload_size,sizeof (*receive));return -EINVAL ; } receive = op->request->payload; len =le16_to_cpu (receive->len);if (len != (op->request->payload_size -sizeof (*receive))) {dev_err (dev,"log request wrong size %d vs %zu\n" , len, - (op->request->payload_size -sizeof (*receive))); + (op->request->payload_size -sizeof (*receive)));return -EINVAL ; }if (len ==0 ) {
drivers/staging/greybus/log.c static int gb_log_probe(struct gb_bundle *bundle, · line 89
Quoted 8 lines
drivers/staging/greybus/log.c +1
-1@@ -83,7 +83,7 @@ static int gb_log_probe(struct gb_bundle *bundle,return -ENOMEM ; connection =gb_connection_create (bundle,le16_to_cpu (cport_desc->id), - gb_log_request_handler); + gb_log_request_handler);if (IS_ERR (connection)) { retval =PTR_ERR (connection); goto error_free;
Signature · 1 line
viresh
Re: [greybus-dev] [PATCH 6/9] staging: greybus: loopback: Fix up some alignment checkpatch issues
In reply to Greg Kroah-HartmanQuoted 27 lines · Greg Kroah-Hartman
Some function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy.
Cc "Bryan O'Donoghue" <[email protected]>Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/staging/greybus/loopback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/greybus/loopback.c +1
-1@@ -882,7 +882,7 @@ static int gb_loopback_fn(void *data) gb->type =0 ; gb->send_count =0 ;sysfs_notify (&gb->dev->kobj,NULL , -"iteration_count" ); +"iteration_count" );dev_dbg (&bundle->dev,"load test complete\n" ); }else { dev_dbg(&bundle->dev,
drivers/staging/greybus/loopback.c static int gb_loopback_probe(struct gb_bundle *bundle, · line 1060
Quoted 8 lines
drivers/staging/greybus/loopback.c +1
-1@@ -1054,7 +1054,7 @@ static int gb_loopback_probe(struct gb_bundle *bundle,/* Allocate kfifo */ if (kfifo_alloc (&gb->kfifo_lat, kfifo_depth *sizeof (u32), -GFP_KERNEL )) { +GFP_KERNEL )) { retval = -ENOMEM ; goto out_conn; }
Signature · 1 line
viresh
Re: [greybus-dev] [PATCH 8/9] staging: greybus: move the greybus core to drivers/greybus
In reply to Greg Kroah-HartmanQuoted 11 lines · Greg Kroah-Hartman
The Greybus core code has been stable for a long time, and has been shipping for many years in millions of phones. With the advent of a recent Google Summer of Code project, and a number of new devices in the works from various companies, it is time to get the core greybus code out of staging as it really is going to be with us for a while.
Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Signature · 1 line
viresh
Re: [greybus-dev] [PATCH 9/9] staging: greybus: move es2 to drivers/greybus/
In reply to Greg Kroah-HartmanQuoted 8 lines · Greg Kroah-Hartman
The es2 Greybus host controller has long been stable, so move it out of
drivers/staging/todrivers/greybus/Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Quoted 10 lines
---
drivers/greybus/Kconfig | 16 ++++++++++++++++
drivers/greybus/Makefile | 7 +++++++
drivers/{staging => }/greybus/arpc.h | 0
drivers/{staging => }/greybus/es2.c | 2 +-
drivers/staging/greybus/Kconfig | 11 -----------
drivers/staging/greybus/Makefile | 5 -----
6 files changed, 24 insertions(+), 17 deletions(-)
rename drivers/{staging => }/greybus/arpc.h (100%)
rename drivers/{staging => }/greybus/es2.c (99%)Signature · 1 line
viresh
Greg Kroah-Hartman
maintainerRe: [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files
In reply to Viresh KumarQuoted 29 lines · Viresh Kumar
Quoted 19 lines · Greg Kroah-Hartman
When these files originally got an SPDX tag, I used // instead of /* */ for the .h files. Fix this up to use // properly.
Cc Viresh Kumar <[email protected]>Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/staging/greybus/firmware.h | 2 +- drivers/staging/greybus/gb-camera.h | 2 +- drivers/staging/greybus/gbphy.h | 2 +- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/greybus_authentication.h | 2 +- drivers/staging/greybus/greybus_firmware.h | 2 +- drivers/staging/greybus/greybus_manifest.h | 2 +- drivers/staging/greybus/greybus_protocols.h | 2 +- drivers/staging/greybus/greybus_trace.h | 2 +-Quoted 8 lines
drivers/staging/greybus/hd.h | 2 +- drivers/staging/greybus/interface.h | 2 +- drivers/staging/greybus/manifest.h | 2 +- drivers/staging/greybus/module.h | 2 +- drivers/staging/greybus/operation.h | 2 +- drivers/staging/greybus/spilib.h | 2 +- drivers/staging/greybus/svc.h | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-)
Quoted 1 line
Acked-by Viresh Kumar <[email protected]>
Thanks for all of the acks!
greg k-h
Re: [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files
Hi Greg,
Quoted 30 lines · Greg Kroah-Hartman
Quoted 29 lines · Viresh Kumar
Quoted 27 lines · Greg Kroah-Hartman
When these files originally got an SPDX tag, I used // instead of /* */ for the .h files. Fix this up to use // properly.
Cc Viresh Kumar <[email protected]>Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/staging/greybus/firmware.h | 2 +- drivers/staging/greybus/gb-camera.h | 2 +- drivers/staging/greybus/gbphy.h | 2 +- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/greybus_authentication.h | 2 +- drivers/staging/greybus/greybus_firmware.h | 2 +- drivers/staging/greybus/greybus_manifest.h | 2 +- drivers/staging/greybus/greybus_protocols.h | 2 +- drivers/staging/greybus/greybus_trace.h | 2 +- drivers/staging/greybus/hd.h | 2 +- drivers/staging/greybus/interface.h | 2 +- drivers/staging/greybus/manifest.h | 2 +- drivers/staging/greybus/module.h | 2 +- drivers/staging/greybus/operation.h | 2 +- drivers/staging/greybus/spilib.h | 2 +- drivers/staging/greybus/svc.h | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-)
Quoted 5 lines
Quoted 1 line
Acked-by Viresh Kumar <[email protected]>Thanks for all of the acks!
greg k-h
I found similar issues of graybus when I tested the latest staging-testing
In file included from <command-line>:0:0:./include/linux/greybus/greybus_protocols.h:45:2: error: unknown type name ‘__le16’
__le16 size; /* Size in bytes of header + payload */
^~~~~~./include/linux/greybus/greybus_protocols.h:46:2: error: unknown type name ‘__le16’
__le16 operation_id; /* Operation unique id */
^~~~~~./include/linux/greybus/greybus_protocols.h:47:2: error: unknown type name ‘__u8’
__u8 type; /* E.g GB_I2C_TYPE_* or GB_GPIO_TYPE_* */
^~~~./include/linux/greybus/greybus_protocols.h:48:2: error: unknown type name ‘__u8’
__u8 result; /* Result of request (in responses only) */
^~~~./include/linux/greybus/greybus_protocols.h:49:2: error: unknown type name ‘__u8’
__u8 pad[2]; /* must be zero (ignore when read) */
^~~~./include/linux/greybus/greybus_protocols.h:58:2: error: unknown type name ‘__u8’
__u8 phase;
^~~~./include/linux/greybus/greybus_protocols.h:88:2: error: unknown type name ‘__u8’
__u8 major;
^~~~./include/linux/greybus/greybus_protocols.h:89:2: error: unknown type name ‘__u8’
__u8 minor;
^~~~./include/linux/greybus/greybus_protocols.h:93:2: error: unknown type name ‘__u8’
__u8 major;
^~~~./include/linux/greybus/greybus_protocols.h:94:2: error: unknown type name ‘__u8’
__u8 minor;
^~~~./include/linux/greybus/greybus_protocols.h:98:2: error: unknown type name ‘__u8’
__u8 bundle_id;
^~~~./include/linux/greybus/greybus_protocols.h:102:2: error: unknown type name ‘__u8’
__u8 major;
^~~~./include/linux/greybus/greybus_protocols.h:103:2: error: unknown type name ‘__u8’
__u8 minor;
^~~~./include/linux/greybus/greybus_protocols.h:108:2: error: unknown type name ‘__le16’
__le16 size;
^~~~~~./include/linux/greybus/greybus_protocols.h:113:2: error: unknown type name ‘__u8’
__u8 data[0];
^~~~./include/linux/greybus/greybus_protocols.h:118:2: error: unknown type name ‘__le16’
__le16 cport_id;
^~~~~~./include/linux/greybus/greybus_protocols.h:122:2: error: unknown type name ‘__le16’
__le16 cport_id;
.. and other files...
Not very sure... but it seems it can be observed with allmodconfig or CONFIG_KERNEL_HEADER_TEST=y and fail my compilation... Hope that of some help (kind reminder...)
Thanks,
Gao Xiang
Quoted 4 lines
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Quoted 9 lines · Greg Kroah-Hartman
The Greybus code has long been "stable" but was living in the
drivers/staging/directory to see if there really was going to be devices using this protocol over the long-term. With the success of millions of phones with this hardware and code in it, and the recent Google Summer of Code project, and a number of of new devices in the works from various companies, it is time to finally move this code out of staging into the "real" portion of the kernel so that people know they can rely on it.
Quoted 7 lines
This series first does a little bit of checkpatch cleanups for some basic remaining issues in the greybus files, and then moves the include directory, the greybus core code, and the es2 greybus host controller driver into
drivers/greybus.To come after this is the movement of the Documentation entries and a number of the module drivers that are stable.
They all look good to me. (I don't always agree with checkpatch, but standardization is good.) Thanks Greg.
Quoted 116 lines
Greg Kroah-Hartman (9):
staging: greybus: fix up SPDX comment in .h files
staging: greybus: remove license "boilerplate"
staging: greybus: hd: Fix up some alignment checkpatch issues
staging: greybus: manifest: Fix up some alignment checkpatch issues
staging: greybus: log: Fix up some alignment checkpatch issues
staging: greybus: loopback: Fix up some alignment checkpatch issues
staging: greybus: move core include files toinclude/linux/greybus/
staging: greybus: move the greybus core todrivers/greybus
staging: greybus: move es2 todrivers/greybus/MAINTAINERS | 3 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/greybus/Kconfig | 32 +++++ drivers/greybus/Makefile | 26 +++++ drivers/greybus/arpc.h | 63 ++++++++++ drivers/{staging => }/greybus/bundle.c | 2 +- drivers/{staging => }/greybus/connection.c | 2 +- drivers/{staging => }/greybus/control.c | 2 +- drivers/{staging => }/greybus/core.c | 2 +- drivers/{staging => }/greybus/debugfs.c | 3 +- drivers/{staging => }/greybus/es2.c | 3 +- drivers/{staging => }/greybus/greybus_trace.h | 2 +- drivers/{staging => }/greybus/hd.c | 12 +- drivers/{staging => }/greybus/interface.c | 2 +- drivers/{staging => }/greybus/manifest.c | 41 ++++--- drivers/{staging => }/greybus/module.c | 2 +- drivers/{staging => }/greybus/operation.c | 2 +- drivers/{staging => }/greybus/svc.c | 3 +- drivers/{staging => }/greybus/svc_watchdog.c | 2 +- .../Documentation/firmware/authenticate.c | 46 -------- .../greybus/Documentation/firmware/firmware.c | 46 -------- drivers/staging/greybus/Kconfig | 27 ----- drivers/staging/greybus/Makefile | 22 ---- drivers/staging/greybus/arche-platform.c | 2 +- drivers/staging/greybus/arpc.h | 109 ------------------ drivers/staging/greybus/audio_apbridgea.c | 3 +- drivers/staging/greybus/audio_apbridgea.h | 26 +---- drivers/staging/greybus/audio_codec.h | 4 +- drivers/staging/greybus/audio_gb.c | 4 +- drivers/staging/greybus/authentication.c | 3 +- drivers/staging/greybus/bootrom.c | 2 +- drivers/staging/greybus/camera.c | 2 +- drivers/staging/greybus/firmware.h | 4 +- drivers/staging/greybus/fw-core.c | 2 +- drivers/staging/greybus/fw-download.c | 2 +- drivers/staging/greybus/fw-management.c | 2 +- drivers/staging/greybus/gb-camera.h | 2 +- drivers/staging/greybus/gbphy.c | 2 +- drivers/staging/greybus/gbphy.h | 2 +- drivers/staging/greybus/gpio.c | 2 +- .../staging/greybus/greybus_authentication.h | 48 +------- drivers/staging/greybus/greybus_firmware.h | 48 +------- drivers/staging/greybus/hid.c | 3 +- drivers/staging/greybus/i2c.c | 2 +- drivers/staging/greybus/light.c | 4 +- drivers/staging/greybus/log.c | 9 +- drivers/staging/greybus/loopback.c | 9 +- drivers/staging/greybus/power_supply.c | 3 +- drivers/staging/greybus/pwm.c | 2 +- drivers/staging/greybus/raw.c | 3 +- drivers/staging/greybus/sdio.c | 2 +- drivers/staging/greybus/spi.c | 2 +- drivers/staging/greybus/spilib.c | 2 +- drivers/staging/greybus/spilib.h | 2 +- drivers/staging/greybus/tools/loopback_test.c | 2 - drivers/staging/greybus/uart.c | 2 +- drivers/staging/greybus/usb.c | 2 +- drivers/staging/greybus/vibrator.c | 3 +- .../greybus => include/linux}/greybus.h | 26 ++--- .../linux}/greybus/bundle.h | 0 .../linux}/greybus/connection.h | 0 .../linux}/greybus/control.h | 0 .../linux}/greybus/greybus_id.h | 0 .../linux}/greybus/greybus_manifest.h | 2 +- .../linux}/greybus/greybus_protocols.h | 48 +------- .../staging => include/linux}/greybus/hd.h | 2 +- .../linux}/greybus/interface.h | 2 +- .../linux}/greybus/manifest.h | 2 +- .../linux}/greybus/module.h | 2 +- .../linux}/greybus/operation.h | 2 +- .../staging => include/linux}/greybus/svc.h | 2 +- 72 files changed, 225 insertions(+), 532 deletions(-) create mode 100644 drivers/greybus/Kconfig create mode 100644 drivers/greybus/Makefile create mode 100644 drivers/greybus/arpc.h rename drivers/{staging => }/greybus/bundle.c (99%) rename drivers/{staging => }/greybus/connection.c (99%) rename drivers/{staging => }/greybus/control.c (99%) rename drivers/{staging => }/greybus/core.c (99%) rename drivers/{staging => }/greybus/debugfs.c (94%) rename drivers/{staging => }/greybus/es2.c (99%) rename drivers/{staging => }/greybus/greybus_trace.h (99%) rename drivers/{staging => }/greybus/hd.c (96%) rename drivers/{staging => }/greybus/interface.c (99%) rename drivers/{staging => }/greybus/manifest.c (95%) rename drivers/{staging => }/greybus/module.c (99%) rename drivers/{staging => }/greybus/operation.c (99%) rename drivers/{staging => }/greybus/svc.c (99%) rename drivers/{staging => }/greybus/svc_watchdog.c (99%) delete mode 100644 drivers/staging/greybus/arpc.h rename {drivers/staging/greybus => include/linux}/greybus.h (88%) rename {drivers/staging => include/linux}/greybus/bundle.h (100%) rename {drivers/staging => include/linux}/greybus/connection.h (100%) rename {drivers/staging => include/linux}/greybus/control.h (100%) rename {drivers/staging => include/linux}/greybus/greybus_id.h (100%) rename {drivers/staging => include/linux}/greybus/greybus_manifest.h (99%) rename {drivers/staging => include/linux}/greybus/greybus_protocols.h (96%) rename {drivers/staging => include/linux}/greybus/hd.h (98%) rename {drivers/staging => include/linux}/greybus/interface.h (98%) rename {drivers/staging => include/linux}/greybus/manifest.h (87%) rename {drivers/staging => include/linux}/greybus/module.h (94%) rename {drivers/staging => include/linux}/greybus/operation.h (99%) rename {drivers/staging => include/linux}/greybus/svc.h (98%)
I can't compile greybus so it's hard to run Smatch on it... I have a Smatch thing which ignores missing includes and just tries its best. It mostly generates garbage output but a couple of these look like potential issues:
drivers/staging/greybus/operation.c:379 gb_operation_message_alloc() warn: check 'message_size' for integer overflows 'kzalloc()' drivers/staging/greybus/light.c:1256 gb_lights_request_handler() warn: 'light->channels' double freed drivers/staging/greybus/light.c:1256 gb_lights_request_handler() warn: 'light->name' double freed
regards,
dan carpenter
Greg Kroah-Hartman
maintainerQuoted 4 lines · Dan Carpenter
I can't compile greybus so it's hard to run Smatch on it... I have a Smatch thing which ignores missing includes and just tries its best. It mostly generates garbage output but a couple of these look like potential issues:
Why can't you compile the code?
Quoted 1 line
drivers/staging/greybus/operation.c:379gb_operation_message_alloc()warn: check 'message_size' for integer overflows 'kzalloc()'
That should be checked on line 368, right?
Quoted 2 lines
drivers/staging/greybus/light.c:1256gb_lights_request_handler()warn: 'light->channels' double freeddrivers/staging/greybus/light.c:1256gb_lights_request_handler()warn: 'light->name' double freed
I don't understand this warning, how are these potentially double freed?
And the light.c file isn't moving out of drivers/staging/ just yet :)
thanks,
greg k-h
Rui Miguel Silva
maintainerHi,
Quoted 8 lines · Greg Kroah-Hartman
Quoted 4 lines · Dan Carpenter
I can't compile greybus so it's hard to run Smatch on it... I have a Smatch thing which ignores missing includes and just tries its best. It mostly generates garbage output but a couple of these look like potential issues:
Why can't you compile the code?
I think we are missing includes in some of the
greybus header files.
Quoted 12 lines
Quoted 2 lines
drivers/staging/greybus/operation.c:379gb_operation_message_alloc()warn: check 'message_size' for integer overflows 'kzalloc()'That should be checked on line 368, right?
Quoted 2 lines
drivers/staging/greybus/light.c:1256gb_lights_request_handler()warn: 'light->channels' double freeddrivers/staging/greybus/light.c:1256gb_lights_request_handler()warn: 'light->name' double freedI don't understand this warning, how are these potentially double freed?
And the
light.cfile isn't moving out ofdrivers/staging/just yet :)
I will take a look at this also.
Cheers,
Rui
Quoted 2 lines · Greg Kroah-Hartman
Why can't you compile the code?
Now that I try to investigate the compile errors, it starts to compile perfectly...
Quoted 3 lines
Quoted 1 line
drivers/staging/greybus/operation.c:379gb_operation_message_alloc()warn: check 'message_size' for integer overflows 'kzalloc()'That should be checked on line 368, right?
This is a false positive. I assumed it was related to the compile problem...
Quoted 5 lines
Quoted 3 lines
drivers/staging/greybus/light.c:1256gb_lights_request_handler()warn: 'light->channels' double freeddrivers/staging/greybus/light.c:1256gb_lights_request_handler()warn: 'light->name' double freedI don't understand this warning, how are these potentially double freed?
I will fix these.
regards,
dan carpenter
Re: [PATCH 2/9] staging: greybus: remove license "boilerplate"
In reply to Greg Kroah-HartmanQuoted 13 lines · Greg Kroah-Hartman
When the greybus drivers were converted to SPDX identifiers for the license text, some license boilerplate was not removed. Clean this up by removing this unneeded text now.
Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Cc Vaibhav Agarwal <[email protected]>Cc Mark Greer <[email protected]>Cc Viresh Kumar <[email protected]>Cc "Bryan O'Donoghue" <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Quoted 1 line
---
Re: [PATCH 7/9] staging: greybus: move core include files to include/linux/greybus/
In reply to Greg Kroah-HartmanQuoted 16 lines · Greg Kroah-Hartman
With the goal of moving the core of the greybus code out of staging, the include files need to be moved to
include/linux/greybus.handinclude/linux/greybus/Cc Vaibhav Hiremath <[email protected]>Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Cc Vaibhav Agarwal <[email protected]>Cc Mark Greer <[email protected]>Cc Viresh Kumar <[email protected]>Cc Rui Miguel Silva <[email protected]>Cc David Lin <[email protected]>Cc "Bryan O'Donoghue" <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Quoted 1 line
---
Quoted 8 lines · Rui Miguel Silva
Hi,
Quoted 6 lines · Greg Kroah-Hartman
Quoted 4 lines · Dan Carpenter
I can't compile greybus so it's hard to run Smatch on it... I have a Smatch thing which ignores missing includes and just tries its best. It mostly generates garbage output but a couple of these look like potential issues:
Quoted 5 lines
Quoted 2 lines
Why can't you compile the code?
I think we are missing includes in some of the
greybus header files.
Really? Where? Builds fine here and passes 0-day :)
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files
In reply to Gao XiangQuoted 93 lines · Gao Xiang
Hi Greg,
Quoted 30 lines · Greg Kroah-Hartman
Quoted 29 lines · Viresh Kumar
Quoted 27 lines · Greg Kroah-Hartman
When these files originally got an SPDX tag, I used // instead of /* */ for the .h files. Fix this up to use // properly.
Cc Viresh Kumar <[email protected]>Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/staging/greybus/firmware.h | 2 +- drivers/staging/greybus/gb-camera.h | 2 +- drivers/staging/greybus/gbphy.h | 2 +- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/greybus_authentication.h | 2 +- drivers/staging/greybus/greybus_firmware.h | 2 +- drivers/staging/greybus/greybus_manifest.h | 2 +- drivers/staging/greybus/greybus_protocols.h | 2 +- drivers/staging/greybus/greybus_trace.h | 2 +- drivers/staging/greybus/hd.h | 2 +- drivers/staging/greybus/interface.h | 2 +- drivers/staging/greybus/manifest.h | 2 +- drivers/staging/greybus/module.h | 2 +- drivers/staging/greybus/operation.h | 2 +- drivers/staging/greybus/spilib.h | 2 +- drivers/staging/greybus/svc.h | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-)Quoted 5 lines
Quoted 1 line
Acked-by Viresh Kumar <[email protected]>Thanks for all of the acks!
greg k-h
I found similar issues of graybus when I tested the latest staging-testing
In file included from <command-line>:0:0:
./include/linux/greybus/greybus_protocols.h:45:2: error: unknown type name ‘__le16’
__le16size; /* Size in bytes of header + payload */
^~~~~~./include/linux/greybus/greybus_protocols.h:46:2: error: unknown type name ‘__le16’
__le16operation_id; /* Operation unique id */
^~~~~~./include/linux/greybus/greybus_protocols.h:47:2: error: unknown type name ‘__u8’
__u8type; /* E.g GB_I2C_TYPE_* or GB_GPIO_TYPE_* */
^~~~./include/linux/greybus/greybus_protocols.h:48:2: error: unknown type name ‘__u8’
__u8result; /* Result of request (in responses only) */
^~~~./include/linux/greybus/greybus_protocols.h:49:2: error: unknown type name ‘__u8’
__u8pad[2]; /* must be zero (ignore when read) */
^~~~./include/linux/greybus/greybus_protocols.h:58:2: error: unknown type name ‘__u8’
__u8phase;
^~~~./include/linux/greybus/greybus_protocols.h:88:2: error: unknown type name ‘__u8’
__u8major;
^~~~./include/linux/greybus/greybus_protocols.h:89:2: error: unknown type name ‘__u8’
__u8minor;
^~~~./include/linux/greybus/greybus_protocols.h:93:2: error: unknown type name ‘__u8’
__u8major;
^~~~./include/linux/greybus/greybus_protocols.h:94:2: error: unknown type name ‘__u8’
__u8minor;
^~~~./include/linux/greybus/greybus_protocols.h:98:2: error: unknown type name ‘__u8’
__u8bundle_id;
^~~~./include/linux/greybus/greybus_protocols.h:102:2: error: unknown type name ‘__u8’
__u8major;
^~~~./include/linux/greybus/greybus_protocols.h:103:2: error: unknown type name ‘__u8’
__u8minor;
^~~~./include/linux/greybus/greybus_protocols.h:108:2: error: unknown type name ‘__le16’
__le16size;
^~~~~~./include/linux/greybus/greybus_protocols.h:113:2: error: unknown type name ‘__u8’
__u8data[0];
^~~~./include/linux/greybus/greybus_protocols.h:118:2: error: unknown type name ‘__le16’
__le16cport_id;
^~~~~~./include/linux/greybus/greybus_protocols.h:122:2: error: unknown type name ‘__le16’
__le16cport_id;
Quoted 5 lines
.. and other files...
Not very sure... but it seems it can be observed with allmodconfig or
CONFIG_KERNEL_HEADER_TEST=yand fail my compilation... Hope that of some help (kind reminder...)
Ah, thank you so much for this, NOW that makes sense why I got that odd kbuild warning that I could not figure out.
Let me go fix this up, thank you so much.
greg k-h
Rui Miguel Silva
maintainerHi Greg,
Quoted 9 lines · Greg KH
Quoted 8 lines · Rui Miguel Silva
Hi,
Quoted 6 lines · Greg Kroah-Hartman
Quoted 4 lines · Dan Carpenter
I can't compile greybus so it's hard to run Smatch on it... I have a Smatch thing which ignores missing includes and just tries its best. It mostly generates garbage output but a couple of these look like potential issues:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Why can't you compile the code?
I think we are missing includes in some of the
greybus header files.Really? Where? Builds fine here and passes 0-day :)
Yeah; just sent a patch to fix it.
Cheers,
Rui
Re: [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files
In reply to Greg Kroah-HartmanQuoted 94 lines · Greg Kroah-Hartman
Quoted 93 lines · Gao Xiang
Hi Greg,
Quoted 30 lines · Greg Kroah-Hartman
Quoted 29 lines · Viresh Kumar
Quoted 27 lines · Greg Kroah-Hartman
When these files originally got an SPDX tag, I used // instead of /* */ for the .h files. Fix this up to use // properly.
Cc Viresh Kumar <[email protected]>Cc Johan Hovold <[email protected]>Cc Alex Elder <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/staging/greybus/firmware.h | 2 +- drivers/staging/greybus/gb-camera.h | 2 +- drivers/staging/greybus/gbphy.h | 2 +- drivers/staging/greybus/greybus.h | 2 +- drivers/staging/greybus/greybus_authentication.h | 2 +- drivers/staging/greybus/greybus_firmware.h | 2 +- drivers/staging/greybus/greybus_manifest.h | 2 +- drivers/staging/greybus/greybus_protocols.h | 2 +- drivers/staging/greybus/greybus_trace.h | 2 +- drivers/staging/greybus/hd.h | 2 +- drivers/staging/greybus/interface.h | 2 +- drivers/staging/greybus/manifest.h | 2 +- drivers/staging/greybus/module.h | 2 +- drivers/staging/greybus/operation.h | 2 +- drivers/staging/greybus/spilib.h | 2 +- drivers/staging/greybus/svc.h | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-)Quoted 5 lines
Quoted 1 line
Acked-by Viresh Kumar <[email protected]>Thanks for all of the acks!
greg k-h
I found similar issues of graybus when I tested the latest staging-testing
In file included from <command-line>:0:0:
./include/linux/greybus/greybus_protocols.h:45:2: error: unknown type name ??????_le16??????
__le16size; /* Size in bytes of header + payload */
^~~~~~./include/linux/greybus/greybus_protocols.h:46:2: error: unknown type name ??????_le16??????
__le16operation_id; /* Operation unique id */
^~~~~~./include/linux/greybus/greybus_protocols.h:47:2: error: unknown type name ??????_u8??????
__u8type; /* E.g GB_I2C_TYPE_* or GB_GPIO_TYPE_* */
^~~~./include/linux/greybus/greybus_protocols.h:48:2: error: unknown type name ??????_u8??????
__u8result; /* Result of request (in responses only) */
^~~~./include/linux/greybus/greybus_protocols.h:49:2: error: unknown type name ??????_u8??????
__u8pad[2]; /* must be zero (ignore when read) */
^~~~./include/linux/greybus/greybus_protocols.h:58:2: error: unknown type name ??????_u8??????
__u8phase;
^~~~./include/linux/greybus/greybus_protocols.h:88:2: error: unknown type name ??????_u8??????
__u8major;
^~~~./include/linux/greybus/greybus_protocols.h:89:2: error: unknown type name ??????_u8??????
__u8minor;
^~~~./include/linux/greybus/greybus_protocols.h:93:2: error: unknown type name ??????_u8??????
__u8major;
^~~~./include/linux/greybus/greybus_protocols.h:94:2: error: unknown type name ??????_u8??????
__u8minor;
^~~~./include/linux/greybus/greybus_protocols.h:98:2: error: unknown type name ??????_u8??????
__u8bundle_id;
^~~~./include/linux/greybus/greybus_protocols.h:102:2: error: unknown type name ??????_u8??????
__u8major;
^~~~./include/linux/greybus/greybus_protocols.h:103:2: error: unknown type name ??????_u8??????
__u8minor;
^~~~./include/linux/greybus/greybus_protocols.h:108:2: error: unknown type name ??????_le16??????
__le16size;
^~~~~~./include/linux/greybus/greybus_protocols.h:113:2: error: unknown type name ??????_u8??????
__u8data[0];
^~~~./include/linux/greybus/greybus_protocols.h:118:2: error: unknown type name ??????_le16??????
__le16cport_id;
^~~~~~./include/linux/greybus/greybus_protocols.h:122:2: error: unknown type name ??????_le16??????
__le16cport_id;
Quoted 8 lines
Quoted 5 lines
.. and other files...
Not very sure... but it seems it can be observed with allmodconfig or
CONFIG_KERNEL_HEADER_TEST=yand fail my compilation... Hope that of some help (kind reminder...)Ah, thank you so much for this, NOW that makes sense why I got that odd kbuild warning that I could not figure out.
Yeah, it seems KERNEL_HEADER_TEST is a new feature which aims at ensuring kernel headers are self-contained... I think it can be observed by
CONFIG_GREYBUS and CONFIG_KERNEL_HEADER_TEST are on
see commit 43c78d88036e ("kbuild: compile-test kernel headers to ensure they are self-contained")
Quoted 2 lines
Let me go fix this up, thank you so much.
You're welcome, I was just testing my previous patch after merging as well...
Thanks,
Gao Xiang
Quoted 2 lines
greg k-h
Quoted 14 lines · Rui Miguel Silva
Hi Greg,
Quoted 12 lines · Greg KH
Quoted 11 lines · Rui Miguel Silva
Hi,
Quoted 8 lines · Greg Kroah-Hartman
Quoted 4 lines · Dan Carpenter
I can't compile greybus so it's hard to run Smatch on it... I have a Smatch thing which ignores missing includes and just tries its best. It mostly generates garbage output but a couple of these look like potential issues:
Why can't you compile the code?
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
I think we are missing includes in some of the
greybus header files.Really? Where? Builds fine here and passes 0-day :)
Yeah; just sent a patch to fix it.
Thanks, now merged!
greg k-h
Hi!
Quoted 4 lines
The Greybus code has long been "stable" but was living in the
drivers/staging/directory to see if there really was going to be devices using this protocol over the long-term. With the success of millions of phones with this hardware and code in it, and the recent
So, what phones do have this, for example?
Does that mean that there's large choice of phones well supported by the mainline?
Best regards, Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Greg Kroah-Hartman
maintainerQuoted 8 lines · Pavel Machek
Hi!
Quoted 4 lines
The Greybus code has long been "stable" but was living in the
drivers/staging/directory to see if there really was going to be devices using this protocol over the long-term. With the success of millions of phones with this hardware and code in it, and the recentSo, what phones do have this, for example?
The Motorola Z line, all of the "Moto Mods" use this interface to communicate.
Quoted 2 lines
Does that mean that there's large choice of phones well supported by the mainline?
I have no idea what kernel version they use, you will have to talk to Motorola about that.
greg k-h