All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Kumaravel.Thiagarajan@microchip.com
Cc: Pragash.Mangalapandian@microchip.com,
	Sundararaman.H@microchip.com, axboe@kernel.dk,
	linux-block@vger.kernel.org, miquel.raynal@bootlin.com,
	richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org,
	gregkh@linuxfoundation.org
Subject: Re: Reg: New MFD Driver for my PCIe Device
Date: Mon, 8 Nov 2021 11:04:31 +0000	[thread overview]
Message-ID: <YYkEP62JRb4rCuXQ@google.com> (raw)
In-Reply-To: <CH0PR11MB5380F5BD18F15014BA8B8479E9919@CH0PR11MB5380.namprd11.prod.outlook.com>

On Mon, 08 Nov 2021, Kumaravel.Thiagarajan@microchip.com wrote:

> Dear Lee Jones,
> 
> I am Kumaravel Thiagarajan from Microchip, India and I am new to Linux Kernel development.
> 
> I am currently working on linux kernel driver for one of our PCIe based devices whose BAR 0 maps interface registers for a gpio controller, an OTP memory device controller and an EEPROM device controller into the host processor's memory space.
> 
> Based on earlier inputs from Linus Walleij, I have developed this as a multi-function device driver - First MFD driver (drivers/mfd) gets loaded for the PCIe device and then it spawns two child devices for OTP/EEPROM and GPIO separately.

You may wish to speak with Greg about your architectural decisions.

He usually dislikes the creation of platform devices from PCI ones.

> I have four new files in my local linux source tree as below for community submission.
> 
> 1. mchp_pci1xxxx_gp.h under include/linux/mfd
> 2. mchp_pci1xxxx_gp.c under drivers/mfd
> 3. mchp_pci1xxxx_gpio.c under drivers/gpio
> 4. mchp_pci1xxxx_ otpe2p.c under drivers/mtd/devices
> 
> I have a doubt with the location of the fourth file for the following reasons.
> 
> 1. I have visualized and architected the OTP and EEPROM memories of my device as individual block devices so that I am able to use the linux dd command to program these memories from a binary file directly or edit them directly using applications like hexedit, both of which I am able to do.
> 2. These only look more like block devices to me and not MTD devices (only writes and reads are possible and not erase).
> 
> Can I move the fourth file directly under drivers/block or should there be a new sub directory under drivers/block or leave it as such under drivers/mtd/devices ?

Those are questions for the MTD/Block Maintainers.

I've Cc'ed all of the relevant parties for you.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Kumaravel.Thiagarajan@microchip.com
Cc: Pragash.Mangalapandian@microchip.com,
	Sundararaman.H@microchip.com, axboe@kernel.dk,
	linux-block@vger.kernel.org, miquel.raynal@bootlin.com,
	richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org,
	gregkh@linuxfoundation.org
Subject: Re: Reg: New MFD Driver for my PCIe Device
Date: Mon, 8 Nov 2021 11:04:31 +0000	[thread overview]
Message-ID: <YYkEP62JRb4rCuXQ@google.com> (raw)
In-Reply-To: <CH0PR11MB5380F5BD18F15014BA8B8479E9919@CH0PR11MB5380.namprd11.prod.outlook.com>

On Mon, 08 Nov 2021, Kumaravel.Thiagarajan@microchip.com wrote:

> Dear Lee Jones,
> 
> I am Kumaravel Thiagarajan from Microchip, India and I am new to Linux Kernel development.
> 
> I am currently working on linux kernel driver for one of our PCIe based devices whose BAR 0 maps interface registers for a gpio controller, an OTP memory device controller and an EEPROM device controller into the host processor's memory space.
> 
> Based on earlier inputs from Linus Walleij, I have developed this as a multi-function device driver - First MFD driver (drivers/mfd) gets loaded for the PCIe device and then it spawns two child devices for OTP/EEPROM and GPIO separately.

You may wish to speak with Greg about your architectural decisions.

He usually dislikes the creation of platform devices from PCI ones.

> I have four new files in my local linux source tree as below for community submission.
> 
> 1. mchp_pci1xxxx_gp.h under include/linux/mfd
> 2. mchp_pci1xxxx_gp.c under drivers/mfd
> 3. mchp_pci1xxxx_gpio.c under drivers/gpio
> 4. mchp_pci1xxxx_ otpe2p.c under drivers/mtd/devices
> 
> I have a doubt with the location of the fourth file for the following reasons.
> 
> 1. I have visualized and architected the OTP and EEPROM memories of my device as individual block devices so that I am able to use the linux dd command to program these memories from a binary file directly or edit them directly using applications like hexedit, both of which I am able to do.
> 2. These only look more like block devices to me and not MTD devices (only writes and reads are possible and not erase).
> 
> Can I move the fourth file directly under drivers/block or should there be a new sub directory under drivers/block or leave it as such under drivers/mtd/devices ?

Those are questions for the MTD/Block Maintainers.

I've Cc'ed all of the relevant parties for you.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

       reply	other threads:[~2021-11-08 11:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CH0PR11MB5380F5BD18F15014BA8B8479E9919@CH0PR11MB5380.namprd11.prod.outlook.com>
2021-11-08 11:04 ` Lee Jones [this message]
2021-11-08 11:04   ` Reg: New MFD Driver for my PCIe Device Lee Jones
2021-11-08 11:14   ` Greg KH
2021-11-08 11:14     ` Greg KH
2021-11-08 11:27     ` Lee Jones
2021-11-08 11:27       ` Lee Jones
2021-11-08 12:03       ` Greg KH
2021-11-08 12:03         ` Greg KH
2021-11-16 11:34         ` Kumaravel.Thiagarajan
2021-11-16 11:34           ` Kumaravel.Thiagarajan
2021-11-16 14:20           ` Greg KH
2021-11-16 14:20             ` Greg KH
2021-11-19  9:16             ` Kumaravel.Thiagarajan
2021-11-19  9:16               ` Kumaravel.Thiagarajan
2021-11-19 14:53               ` Greg KH
2021-11-19 14:53                 ` Greg KH
2021-11-23 18:33                 ` Kumaravel.Thiagarajan
2021-11-23 18:33                   ` Kumaravel.Thiagarajan
2021-11-30 17:42                   ` Kumaravel.Thiagarajan
2021-11-30 17:42                     ` Kumaravel.Thiagarajan
2021-12-01  7:11                     ` Greg KH
2021-12-01  7:11                       ` Greg KH

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=YYkEP62JRb4rCuXQ@google.com \
    --to=lee.jones@linaro.org \
    --cc=Kumaravel.Thiagarajan@microchip.com \
    --cc=Pragash.Mangalapandian@microchip.com \
    --cc=Sundararaman.H@microchip.com \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.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 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.