Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753767Ab3FRFlm (ORCPT ); Tue, 18 Jun 2013 01:41:42 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:36013 "EHLO mail-ob0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750704Ab3FRFll (ORCPT ); Tue, 18 Jun 2013 01:41:41 -0400 MIME-Version: 1.0 In-Reply-To: <1371502778-15849-2-git-send-email-oliver+list@schinagl.nl> References: <1371502778-15849-1-git-send-email-oliver+list@schinagl.nl> <1371502778-15849-2-git-send-email-oliver+list@schinagl.nl> Date: Tue, 18 Jun 2013 08:41:41 +0300 Message-ID: Subject: Re: [PATCH 1/2] Initial support for Allwinner's Security ID fuses From: Andy Shevchenko To: Oliver Schinagl Cc: Arnd Bergmann , Greg Kroah-Hartman , "maxime.ripard" , "linux-kernel@vger.kernel.org" , linux-arm Mailing List , Russell King , Linus Walleij , linux-sunxi@googlegroups.com, Oliver Schinagl Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1661 Lines: 48 On Mon, Jun 17, 2013 at 11:59 PM, Oliver Schinagl wrote: > From: Oliver Schinagl > > Allwinner has electric fuses (efuse) on their line of chips. This driver > reads those fuses, seeds the kernel entropy and exports them as a sysfs node. > > These fuses are most likly to be programmed at the factory, encoding > things like Chip ID, some sort of serial number etc and appear to be > reasonable unique. > While in theory, these should be writeable by the user, it will probably > be inconvinient to do so. Allwinner recommends that a certain input pin, > labeled 'efuse_vddq', be connected to GND. To write these fuses, 2.5 V > needs to be applied to this pin. > > Even so, they can still be used to generate a board-unique mac from, board > unique RSA key and seed the kernel RNG. > > +++ b/drivers/misc/eeprom/sunxi_sid.c > @@ -0,0 +1,147 @@ > +#include I don't think you have to use this header explicitly. > +#define DRV_NAME "sunxi-sid" > + if (size > (SID_SIZE - pos)) Useless internal braces. > +static int sunxi_sid_remove(struct platform_device *pdev) > +{ > + device_remove_bin_file(&pdev->dev, &sid_bin_attr); > + dev_dbg(&pdev->dev, "%s driver unloaded\n", DRV_NAME); It's useless to use DRV_NAME in conjunction with dev_* macros. dev_* will print driver name as a prefix. -- With Best Regards, Andy Shevchenko -- 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/