Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1497235 > unrolled thread
| Started by | Pantelis Antoniou <pantelis.antoniou@konsulko.com> |
|---|---|
| First post | 2016-10-07 17:30 +0200 |
| Last post | 2016-10-07 17:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/2] Juniper infrastructure Pantelis Antoniou <pantelis.antoniou@konsulko.com> - 2016-10-07 17:30 +0200
Re: [PATCH 0/2] Juniper infrastructure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-07 17:30 +0200
Re: [PATCH 1/2] staging: jnx: Juniper subsystem & board core APIs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-07 17:40 +0200
| From | Pantelis Antoniou <pantelis.antoniou@konsulko.com> |
|---|---|
| Date | 2016-10-07 17:30 +0200 |
| Subject | [PATCH 0/2] Juniper infrastructure |
| Message-ID | <spF6i-2hj-41@gated-at.bofh.it> |
Introduce a staging driver containing all the bit and pieces of Juniper's board support infrastructure that don't quite fit in any other place. The Juniper series of routers comprise of both x86 and powerpc platforms that contain similar hardware components necessitating common support methods. Note that this is the first submission and we expect things to be moved around as required. This patchset is against mainline as of today: v4.8-9431-g3477d16 and is dependent on the "Juniper prerequisites" patchset sent earlier. Rajat Jain (1): jnx: Introduce include/linux/jnx/pci_ids.h Tom Kavanagh (1): staging: jnx: Juniper subsystem & board core APIs Documentation/ABI/testing/sysfs-platform-jnx | 170 +++++++ drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/jnx/Kconfig | 24 + drivers/staging/jnx/Makefile | 5 + drivers/staging/jnx/jnx-board-core.c | 247 ++++++++++ drivers/staging/jnx/jnx-subsys-private.h | 35 ++ drivers/staging/jnx/jnx-subsys.c | 655 +++++++++++++++++++++++++++ include/linux/jnx/jnx-board-core.h | 41 ++ include/linux/jnx/jnx-subsys.h | 94 ++++ include/linux/jnx/pci_ids.h | 66 +++ 11 files changed, 1340 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-platform-jnx create mode 100644 drivers/staging/jnx/Kconfig create mode 100644 drivers/staging/jnx/Makefile create mode 100644 drivers/staging/jnx/jnx-board-core.c create mode 100644 drivers/staging/jnx/jnx-subsys-private.h create mode 100644 drivers/staging/jnx/jnx-subsys.c create mode 100644 include/linux/jnx/jnx-board-core.h create mode 100644 include/linux/jnx/jnx-subsys.h create mode 100644 include/linux/jnx/pci_ids.h -- 1.9.1
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-10-07 17:30 +0200 |
| Message-ID | <spFfY-2lv-71@gated-at.bofh.it> |
| In reply to | #1497235 |
On Fri, Oct 07, 2016 at 06:15:44PM +0300, Pantelis Antoniou wrote: > Introduce a staging driver containing all the bit and > pieces of Juniper's board support infrastructure that don't quite > fit in any other place. Why staging? > The Juniper series of routers comprise of both x86 and powerpc > platforms that contain similar hardware components necessitating > common support methods. > > Note that this is the first submission and we expect things to be > moved around as required. > > This patchset is against mainline as of today: v4.8-9431-g3477d16 > and is dependent on the "Juniper prerequisites" patchset sent > earlier. sent where? Why not just make a single patch series? > Rajat Jain (1): > jnx: Introduce include/linux/jnx/pci_ids.h > > Tom Kavanagh (1): > staging: jnx: Juniper subsystem & board core APIs > > Documentation/ABI/testing/sysfs-platform-jnx | 170 +++++++ > drivers/staging/Kconfig | 2 + > drivers/staging/Makefile | 1 + > drivers/staging/jnx/Kconfig | 24 + > drivers/staging/jnx/Makefile | 5 + > drivers/staging/jnx/jnx-board-core.c | 247 ++++++++++ > drivers/staging/jnx/jnx-subsys-private.h | 35 ++ > drivers/staging/jnx/jnx-subsys.c | 655 +++++++++++++++++++++++++++ > include/linux/jnx/jnx-board-core.h | 41 ++ > include/linux/jnx/jnx-subsys.h | 94 ++++ > include/linux/jnx/pci_ids.h | 66 +++ staging drivers have to be self-contained, no files outside of your subdirectory please. Once they have "passed" proper review, then you can move files out. Also, I need a TODO file listing what needs to be done, who to contact, and other info about the code. And again, why not just submit this to the real part of the kernel? thanks, greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-10-07 17:40 +0200 |
| Subject | Re: [PATCH 1/2] staging: jnx: Juniper subsystem & board core APIs |
| Message-ID | <spFpD-2pN-19@gated-at.bofh.it> |
| In reply to | #1497235 |
On Fri, Oct 07, 2016 at 06:15:45PM +0300, Pantelis Antoniou wrote:
> From: Tom Kavanagh <tkavanagh@juniper.net>
Minor nit:
> +config JNX_DEVICES
> + bool
> + default n
n is always the default.
And how about a help entry?
> +if JNX_DEVICES
> +
> +menu "Juniper Devices and Infrastructure"
> +
> +config JNX_SYSTEM
> + bool "Juniper System Infrastructure"
> + default y
Only make something 'y' if you have to boot a bare-bones machine with
it. That means almost no driver fits that category, and a staging
driver should never have this set either.
> + help
> + This driver adds support for Juniper System Infrastructure. It creates
> + platform devices for the platform, chassis and cards and provides sysfs
> + attributes for these devices.
> +
> + This driver can not be compiled as a module.
> +
> +endmenu
> +
> +endif # JNX_DEVICES
> diff --git a/drivers/staging/jnx/Makefile b/drivers/staging/jnx/Makefile
> new file mode 100644
> index 0000000..52b8286
> --- /dev/null
> +++ b/drivers/staging/jnx/Makefile
> @@ -0,0 +1,5 @@
> +#
> +# Makefile for Juniper devices that really don't fit anywhere else.
> +#
> +
> +obj-$(CONFIG_JNX_SYSTEM) += jnx-subsys.o jnx-board-core.o
> diff --git a/drivers/staging/jnx/jnx-board-core.c b/drivers/staging/jnx/jnx-board-core.c
> new file mode 100644
> index 0000000..218a8b7
> --- /dev/null
> +++ b/drivers/staging/jnx/jnx-board-core.c
> @@ -0,0 +1,247 @@
> +/*
> + * Juniper Generic Board APIs
> + *
> + * Copyright (C) 2012, 2013, 2014 Juniper Networks. All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
Really "any later version"? I have to ask.
> + *
> + * 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 for more details.
> + */
> +
> +#include <linux/device.h>
> +#include <linux/module.h>
> +#include <linux/i2c.h>
> +#include <linux/err.h>
> +#include <linux/nvmem-consumer.h>
> +#include <linux/platform_data/at24.h>
> +#include <linux/slab.h>
> +#include <linux/jnx/jnx-subsys.h>
> +#include <linux/jnx/jnx-board-core.h>
> +#include <linux/mfd/core.h>
> +#include <linux/mfd/jnx-i2cs-core.h>
> +
> +#include "jnx-subsys-private.h"
> +
> +#define DRIVER_VERSION "0.01.0"
> +#define DRIVER_DESC "Board Generic HW"
> +
> +static LIST_HEAD(jnx_i2c_notify_list);
> +static DEFINE_MUTEX(jnx_i2c_notify_lock);
> +
> +static int jnx_i2c_adap_name_match(struct device *dev, void *data)
> +{
> + struct i2c_adapter *adap = i2c_verify_adapter(dev);
> + char *name = data;
> +
> + if (!adap)
> + return false;
> +
> + return !strncmp(adap->name, name, strlen(name));
> +}
> +
> +struct i2c_adapter *jnx_i2c_find_adapter(char *name)
> +{
> + struct device *dev;
> + struct i2c_adapter *adap;
> +
> + dev = bus_find_device(&i2c_bus_type, NULL, name,
> + jnx_i2c_adap_name_match);
> + if (!dev)
> + return NULL;
> +
> + adap = i2c_verify_adapter(dev);
> + if (!adap)
> + put_device(dev);
> +
> + return adap;
> +}
> +EXPORT_SYMBOL(jnx_i2c_find_adapter);
EXPORT_SYMBOL_GPL()? Same for other exports. I have to ask.
thanks,
greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web