All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Debjit Ghosh <dghosh@juniper.net>,
	Georgi Vlaev <gvlaev@juniper.net>,
	Guenter Roeck <linux@roeck-us.net>,
	Mohammad Kamil <mkamil@juniper.net>,
	Rajat Jain <rajatjain@juniper.net>,
	Shyamshankar Dharmarajan <shyamd@juniper.net>,
	linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org
Subject: Re: [PATCH 1/2] staging: jnx: Juniper subsystem & board core APIs
Date: Fri, 7 Oct 2016 17:34:39 +0200	[thread overview]
Message-ID: <20161007153439.GE10482@kroah.com> (raw)
In-Reply-To: <1475853346-21890-2-git-send-email-pantelis.antoniou@konsulko.com>

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

  reply	other threads:[~2016-10-07 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 15:15 [PATCH 0/2] Juniper infrastructure Pantelis Antoniou
2016-10-07 15:15 ` [PATCH 1/2] staging: jnx: Juniper subsystem & board core APIs Pantelis Antoniou
2016-10-07 15:34   ` Greg Kroah-Hartman [this message]
2016-10-07 15:15 ` [PATCH 2/2] jnx: Introduce include/linux/jnx/pci_ids.h Pantelis Antoniou
2016-10-07 15:31   ` Greg Kroah-Hartman
2016-10-07 15:28 ` [PATCH 0/2] Juniper infrastructure Greg Kroah-Hartman

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20161007153439.GE10482@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=dghosh@juniper.net \
    --cc=gvlaev@juniper.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mkamil@juniper.net \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=rajatjain@juniper.net \
    --cc=shyamd@juniper.net \
    /path/to/YOUR_REPLY

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

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