Devicetree
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Vadim Pasternak <vadimp@mellanox.com>
Cc: robh+dt@kernel.org, pavel@ucw.cz, devicetree@vger.kernel.org,
	j.anaszewski@samsung.com, rpurdie@rpsys.net,
	linux-leds@vger.kernel.org, jiri@resnulli.us,
	jacek.anaszewski@gmail.com
Subject: Re: [patch v2 1/2] mfd: Add Mellanox regmap core driver
Date: Mon, 7 Aug 2017 16:58:36 +0100	[thread overview]
Message-ID: <20170807155836.uqa2nezqqheg6so6@dell> (raw)
In-Reply-To: <1501108094-16898-2-git-send-email-vadimp@mellanox.com>

On Wed, 26 Jul 2017, Vadim Pasternak wrote:

> This patch adds core regmap platform driver for Mellanox BMC cards with
> the programmable devcies based chassis control. The device logics,
> controlled by software includes:
> - Interrupt handling for chassis, ASIC, CPU events;
> - LED handling;
> - Exposes through sysfs mux, reset signals, reset cause notification;
> The patch provides support for the access to programmable device through
> the register map and allows dynamic device tree manipulation at runtime
> for removable devices.
> 
> This driver requires activator driver, which responsibility is to create
> register map and pass it to regmap core. Such activator could be based for
> example on I2C, SPI or  MMIO interface.
> 
> Drivers exposes the number of hwmon attributes to sysfs according to the
> attribute groups, defined in the device tree. These attributes will be
> located for example in /sys/class/hwmon/hwmonX folder, which is a symbolic
> link to for example:
> /sys/bus/i2c/devices/4-0072/mlxreg-core.1138/hwmon/hwmon10.
> The attributes are divided to the groups, like in the below example:
>  MUX nodes
>  - safe_bios_disable
>  - spi_burn_bios_ci
>  - spi_burn_ncsi
>  - uart_sel
>  Reset nodes:
>  - sys_power_cycle
>  - bmc_upgrade
>  - asic_reset
>  Cause of reset nodes:
>  - cpu_kernel_panic
>  - cpu_shutdown
>  - bmc_warm_reset
>  PSU nodes' statuses
>  - psu1
>  - psu2
>  FAN nodes' statuses:
>  - fan1
>  - fan2
>  Power cable nodes' statuses:
>  - pwr1
>  - pwr2
>  Asic nodes' statuses:
>  - asic1
>  - asic2
>  General purpose RW nodes:
>  - version
> 
> Drivers also probes LED platform driver, in case device tree description
> contains LED nodes.
> 
> Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
> ---
> v1->v2:
>  Comments pointed out by Pavel:
>  - Remove extra new line in mellanox,mlxreg-core;
>  - Replace three NOT with one in mlxreg_core_attr_show;
>  - Make error message in mlxreg_core_work_helper shorter;
>  - Make attribute assignment more readable;
>  - Separate mellanox,mlxreg-core file for sending to DT mainataners.
>  Comments pointed out by Jacek:
>  - Since  brightness_set_blocking is used instead of
>    brightness_set, three fields from mlxreg_core_led_data.
> ---
>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>  MAINTAINERS                                        |    7 +
>  drivers/mfd/Kconfig                                |   15 +
>  drivers/mfd/Makefile                               |    1 +
>  drivers/mfd/mlxreg-core.c                          | 1257 ++++++++++++++++++++
>  include/linux/platform_data/mlxreg.h               |   87 ++
>  6 files changed, 1368 insertions(+)
>  create mode 100644 drivers/mfd/mlxreg-core.c
>  create mode 100644 include/linux/platform_data/mlxreg.h

I'm not sure what this driver is, but it isn't an MFD driver.  MFD
drivers purpose is to set up shared resources, then register child
device drivers which live in other subsystems.  Since this device
appears to be networking related, perhaps it might find a suitable
home in drivers/net.  Failing that, you need to split out each of the
functions into their own subsystems; drivers/input, drivers/hwmon,
drivers/reset, etc and supply an MFD driver to register them all.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2017-08-07 15:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26 22:28 [patch v2 0/2] Introduce support for mlxreg mfd core and I2C drivers Vadim Pasternak
     [not found] ` <1501108094-16898-1-git-send-email-vadimp-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-07-26 22:28   ` [patch v2 1/2] mfd: Add Mellanox regmap core driver Vadim Pasternak
2017-08-07 15:58     ` Lee Jones [this message]
2017-08-08  5:59       ` Vadim Pasternak
     [not found]         ` <AM4PR05MB3330A1043B618D723EFF4C8DA28A0-n5Jp0YuYvM1LPiJj6BpYmdqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-08-08  7:02           ` Lee Jones
2017-08-08  7:22             ` Vadim Pasternak
     [not found]               ` <AM4PR05MB33301E39B8BB39F68D49B30DA28A0-n5Jp0YuYvM1LPiJj6BpYmdqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-08-08  7:45                 ` Pavel Machek
2017-08-08  7:59                   ` Vadim Pasternak
     [not found]                     ` <AM4PR05MB33300159962297EEC58F1BDAA28A0-n5Jp0YuYvM1LPiJj6BpYmdqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-08-08  8:17                       ` Pavel Machek
2017-08-08  8:32                         ` Vadim Pasternak
2017-08-08 11:31                           ` Lee Jones
2017-07-26 22:28 ` [patch v2 2/2] mfd: Add Mellanox regmap I2C driver Vadim Pasternak

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=20170807155836.uqa2nezqqheg6so6@dell \
    --to=lee.jones@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=j.anaszewski@samsung.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=rpurdie@rpsys.net \
    --cc=vadimp@mellanox.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox