Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752813AbbL1XVN (ORCPT ); Mon, 28 Dec 2015 18:21:13 -0500 Received: from mail-gw2-out.broadcom.com ([216.31.210.63]:50019 "EHLO mail-gw2-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752566AbbL1XVL (ORCPT ); Mon, 28 Dec 2015 18:21:11 -0500 X-IronPort-AV: E=Sophos;i="5.20,492,1444719600"; d="scan'208";a="84360284" CC: "linux-kernel@vger.kernel.org" , "linux-mtd@lists.infradead.org" To: Greg Kroah-Hartman , Arnd Bergmann , Brian Norris From: Scott Branden Subject: Adding OTP-only device to MTD or CHAR subsystem? Message-ID: <5681C3E4.4090506@broadcom.com> Date: Mon, 28 Dec 2015 15:21:08 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1253 Lines: 28 Greg/Brian/Arnd, We have OTP device drivers for accessing OTP memory in our SoCs. I looking for the right place and model to place such OTP device drivers. 1) Should we follow the bfin-otp model in drivers/char? This doesn't seem like the right place to put it although following the bfin example is quite simple to implement. We actually had a custom set of Ioctl's that I changed to use the standard file access model used by the bfin driver. But a custom util is still needed to issue an OTPLOCK command. I'm guess mtd-utils has such abilities (or should). 2) Instead, should we start adding OTP-only drivers into the MTD subsystem? Onenand and CFI based MTD devices already have OTP programmable regions. If we created a new OTP device type in the MTD subsystem this looks like a good thing to do. mtd-utils could/should be used to access the OTP device then along with standard fileio operations. 3) Or some other suggestion of where to place OTP device drivers? Regards, Scott -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/