Re: [PATCH 2/4] fpga: manager: change api, don't use drvdata

2018-04-27 Thread Florian Fainelli
On 04/27/2018 04:30 PM, Alan Tull wrote:
> On Fri, Apr 27, 2018 at 1:26 PM, Florian Fainelli <f.faine...@gmail.com> 
> wrote:
>> On 04/26/2018 06:26 PM, Moritz Fischer wrote:
>>> From: Alan Tull <at...@kernel.org>
>>>
>>> Change fpga_mgr_register to not set or use drvdata.  This supports
>>> the case where a PCIe device has more than one manager.
>>>
>>> Add fpga_mgr_create/free functions.  Change fpga_mgr_register and
>>> fpga_mgr_unregister functions to take the mgr struct as their only
>>> parameter.
>>>
>>>   struct fpga_manager *fpga_mgr_create(struct device *dev,
>>> const char *name,
>>> const struct fpga_manager_ops *mops,
>>> void *priv);
>>>   void fpga_mgr_free(struct fpga_manager *mgr);
>>>   int fpga_mgr_register(struct fpga_manager *mgr);
>>>   void fpga_mgr_unregister(struct fpga_manager *mgr);
>>>
>>> Update the drivers that call fpga_mgr_register with the new API.
>>
>> Apologies for chiming in so late, this commit does not make it clear
>> that fpga_mgr_unregister() now also free the 'mgr' argument by calling
>> fpga_mgr_free(), this is kind of detail, but an API should make that
>> clear IMHO.
> 
> If people follow the usage information, in
> Documentation/fpga/fpga-mgr.txt, they'll do the right thing.  But I
> can add a patch that clarifies the description of fpga_mgr_unregister
> in fpga-mgr.c that it "unregisters and frees" the manager.

Just mentioning that because not all APIs do this, take the network
devices: there is an unregister_netdev() and a free_netdev(). Either way
is fine with me as long as it is documented as such, I had to look at
the API implementation to figure out that, no, all the drivers were not
leaking their fpga_manager instance in their .remove() function :)
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/4] fpga: manager: change api, don't use drvdata

2018-04-27 Thread Florian Fainelli
On 04/26/2018 06:26 PM, Moritz Fischer wrote:
> From: Alan Tull 
> 
> Change fpga_mgr_register to not set or use drvdata.  This supports
> the case where a PCIe device has more than one manager.
> 
> Add fpga_mgr_create/free functions.  Change fpga_mgr_register and
> fpga_mgr_unregister functions to take the mgr struct as their only
> parameter.
> 
>   struct fpga_manager *fpga_mgr_create(struct device *dev,
> const char *name,
> const struct fpga_manager_ops *mops,
> void *priv);
>   void fpga_mgr_free(struct fpga_manager *mgr);
>   int fpga_mgr_register(struct fpga_manager *mgr);
>   void fpga_mgr_unregister(struct fpga_manager *mgr);
> 
> Update the drivers that call fpga_mgr_register with the new API.

Apologies for chiming in so late, this commit does not make it clear
that fpga_mgr_unregister() now also free the 'mgr' argument by calling
fpga_mgr_free(), this is kind of detail, but an API should make that
clear IMHO.

Thanks
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 11/11] phylink: convert to fwnode

2017-12-01 Thread Florian Fainelli
On 12/01/2017 02:25 AM, Russell King wrote:
> Convert phylink to fwnode, switching phylink_create() from taking a
> device_node to taking a fwnode_handle. This will allow other firmware
> systems to take advantage of sfp/phylink support.
> 
> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 10/11] sfp: convert to fwnode

2017-12-01 Thread Florian Fainelli
On 12/01/2017 02:25 AM, Russell King wrote:
> Convert sfp-bus to use fwnode rather than device_node internally, so
> we can support more than just device tree firmware.
> 
> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 08/11] sfp: add documentation for kernel APIs

2017-12-01 Thread Florian Fainelli
On 12/01/2017 02:24 AM, Russell King wrote:
> Add kernel-doc documentation for sfp kernel APIs, and link it into the
> networking kapi documentation under "Network device support".
> 
> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 07/11] phylink: add documentation for kernel APIs

2017-12-01 Thread Florian Fainelli
On 12/01/2017 02:24 AM, Russell King wrote:
> Add kernel-doc documentation for phylink kernel APIs, and link it into
> the networking kapi documentation under "Network device support".
> 
> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>

Thanks!
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 06/11] phylink: restart 802.3z negotiation when starting net device

2017-12-01 Thread Florian Fainelli
On 12/01/2017 02:24 AM, Russell King wrote:
> Restart 802.3z negotiation when the net device is brought up to ensure
> that the link partner has our current link modes.
> 
> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 05/11] phylink: remove phylink_init_eee()

2017-12-01 Thread Florian Fainelli
On 12/01/2017 02:24 AM, Russell King wrote:
> phylink_init_eee() serves no purpose, remove it.
> 
> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 04/11] phylink: add support for 2500baseX and 10GbaseKR

2017-12-01 Thread Florian Fainelli
On 12/01/2017 02:24 AM, Russell King wrote:
> Add support for handling the faster 2.5G and 10G link modes when used
> with SFP modules.
> 
> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 03/11] phylink: get rid of separate Cisco SGMII and 802.3z modes

2017-12-01 Thread Florian Fainelli
On 12/01/2017 02:24 AM, Russell King wrote:
> Since the handling of SGMII and 802.3z is now the same, combine the
> MLO_AN_xxx constants into a single MLO_AN_INBAND, and use the PHY
> interface mode to distinguish between Cisco SGMII and 802.3z.
> 
> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 02/11] phylink: merge SGMII and 802.3z handling

2017-12-01 Thread Florian Fainelli
On 12/01/2017 02:24 AM, Russell King wrote:
> The code handling SGMII and 802.3z is essentially the same, except that
> we assume 802.3z has no PHY.  Re-organise the code such that these cases
> are merged, and exclude 802.3z mode from having a PHY attached.  This
> results in the same link handling behaviour as before.
> 
> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/11] phy: add phy_interface_mode_is_8023z() helper

2017-12-01 Thread Florian Fainelli
On 12/01/2017 02:24 AM, Russell King wrote:
> Add and use phy_interface_mode_is_8023z() helper to identify the
> interface modes that use 802.3z negotiation.  Use it in phylink's
> phylink_mac_an_restart().
> 
> Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/13] net: dsa: lan9303: lan9303_port_mdb_del remove port 0

2017-07-24 Thread Florian Fainelli
On 07/20/2017 06:57 AM, Egil Hjelmeland wrote:
> Workaround for dsa_switch_mdb_add adding CPU port to group,
> but forgetting to remove it:
> 
> Remove port 0 if only port 0 is only port left.
> 
> Signed-off-by: Egil Hjelmeland 
> ---
>  drivers/net/dsa/lan9303-core.c | 11 +++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
> index 54646eb38185..61c915eed649 100644
> --- a/drivers/net/dsa/lan9303-core.c
> +++ b/drivers/net/dsa/lan9303-core.c
> @@ -1424,6 +1424,17 @@ static int lan9303_port_mdb_del(
>   if (mdb->vid)
>   return -EOPNOTSUPP;
>   lan9303_alr_del_port(chip, mdb->addr, port);
> +
> + {

No need for curly braces here.

> + /* Workaround for dsa_switch_mdb_add adding CPU port to
> +  * group, but forgetting to remove it. Remove port 0
> +  * if only port left

Should not we move this logic one layer above into DSA then such that
insertions and removals are strictly symmetrical in which and how many
ports are targeted?

> +  **/
> + struct lan9303_alr_cache_entry *entr =
> + lan9303_alr_cache_find_mac(chip, mdb->addr);
> + if (entr && (entr->port_map == BIT(0)))
> + lan9303_alr_del_port(chip, mdb->addr, 0);
> + }
>   return 0;
>  }
>  
> 


-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 12/13] net: dsa: lan9303: Added "stp_enable" sysfs attribute

2017-07-24 Thread Florian Fainelli
On 07/20/2017 06:42 AM, Egil Hjelmeland wrote:
> Must be set to 1 by user space when STP is used on the lan9303.
> If bridging without local STP, leave at 0, so external STP BPDUs
> are forwarded.
> 
> Hopefully the kernel can be improved so the driver can handle this
> without user intervention, and this control can be removed.

Same here, we can't have a driver-specific sysfs attribute just for
this, either we find a way to have the bridge's STP settings propagate
correctly to the switch driver, or you have to make better decisions
based on hints/calls you are getting from switchdev -> dsa -> driver.

> 
> Signed-off-by: Egil Hjelmeland 
> ---
>  Documentation/networking/dsa/lan9303.txt | 23 ++
>  drivers/net/dsa/lan9303-core.c   | 33 
> 
>  2 files changed, 56 insertions(+)
> 
> diff --git a/Documentation/networking/dsa/lan9303.txt 
> b/Documentation/networking/dsa/lan9303.txt
> index ace91c821ce7..0694b6646d2a 100644
> --- a/Documentation/networking/dsa/lan9303.txt
> +++ b/Documentation/networking/dsa/lan9303.txt
> @@ -40,6 +40,10 @@ When a user port is enabled, the driver creates sysfs 
> directory
>   - alr_dump (RO): List the 168 first entries of the ALR table.
>Including port 0 entires. This file is identical for both ports.
>Format: MAC; list of ports; (l)earned / (s)tatic
> + - stp_enable (RW): Must be set to 1 when STP is used. Installs an ALR
> +  entry so that received STP BPDUs are only sent to port 0.
> +  When 0 (default) received STP BPDUs are forwarded to all ports.
> +  This file is identical for both ports.
>   - swe_bcst_throt (RW): Set/get 6.4.7 Broadcast Storm Control
>Throttle Level for the port. Accesses the corresponding bits of
>the SWE_BCST_THROT register (13.4.3.23).
> @@ -49,3 +53,22 @@ Driver limitations
>  ==
>  
>   - No support for VLAN
> +
> +
> +Bridging notes
> +==
> +When the user ports are bridged, broadcasts, multicasts and unknown
> +frames with unknown destination are flooded by the chip. Therefore SW
> +flooding must be disabled by:
> +
> +   echo 0 > /sys/class/net/p1/brport/broadcast_flood
> +   echo 0 > /sys/class/net/p1/brport/multicast_flood
> +   echo 0 > /sys/class/net/p1/brport/unicast_flood
> +   echo 0 > /sys/class/net/p2/brport/broadcast_flood
> +   echo 0 > /sys/class/net/p2/brport/multicast_flood
> +   echo 0 > /sys/class/net/p2/brport/unicast_flood
> +
> +If enabling local STP, the LAN9303 must be configured to forward
> +BPDUs only to port 0, by writing 1 to "stp_enable" of one of the ports:
> +
> +   echo 1 > /sys/class/net/p1/lan9303/stp_enable
> diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
> index b682aa4f1fca..54646eb38185 100644
> --- a/drivers/net/dsa/lan9303-core.c
> +++ b/drivers/net/dsa/lan9303-core.c
> @@ -187,6 +187,8 @@
>  #define MII_LAN911X_SPECIAL_MODES 0x12
>  #define MII_LAN911X_SPECIAL_CONTROL_STATUS 0x1f
>  
> +#define eth_stp_addr eth_reserved_addr_base
> +
>  static const struct regmap_range lan9303_valid_regs[] = {
>   regmap_reg_range(0x14, 0x17), /* misc, interrupt */
>   regmap_reg_range(0x19, 0x19), /* endian test */
> @@ -988,9 +990,40 @@ alr_dump_show(struct device *dev, struct 
> device_attribute *attr,
>  }
>  static DEVICE_ATTR_RO(alr_dump);
>  
> +static ssize_t
> +stp_enable_show(struct device *dev, struct device_attribute *attr,
> + char *buf)
> +{
> + struct dsa_port *dp = dsa_net_device_to_dsa_port(to_net_dev(dev));
> + struct lan9303 *chip = dp->ds->priv;
> + char result = lan9303_alr_cache_find_mac(chip, eth_stp_addr) ?
> + '1' : '0';
> + return scnprintf(buf, PAGE_SIZE, "%c\n", result);
> +}
> +
> +static ssize_t
> +stp_enable_store(struct device *dev, struct device_attribute *attr,
> +  const char *buf, size_t len)
> +{
> + struct dsa_port *dp = dsa_net_device_to_dsa_port(to_net_dev(dev));
> + struct lan9303 *chip = dp->ds->priv;
> + unsigned long enable;
> + int ret = kstrtoul(buf, 0, );
> +
> + if (ret)
> + return ret;
> + if (enable)
> + lan9303_alr_add_port(chip, eth_stp_addr, 0, true);
> + else
> + lan9303_alr_del_port(chip, eth_stp_addr, 0);
> + return len;
> +}
> +static DEVICE_ATTR_RW(stp_enable);
> +
>  static struct attribute *lan9303_attrs[] = {
>   _attr_swe_bcst_throt.attr,
>   _attr_alr_dump.attr,
> + _attr_stp_enable.attr,
>   NULL
>  };
>  
> 


-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 10/13] net: dsa: lan9303: Only allocate 3 ports

2017-07-24 Thread Florian Fainelli
On 07/20/2017 03:35 AM, Egil Hjelmeland wrote:
> Saving 2628 bytes.
> 
> Signed-off-by: Egil Hjelmeland <egil.hjelmel...@zenitel.com>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 11/13] net: dsa: lan9303: Added "alr_dump" sysfs port attribute

2017-07-24 Thread Florian Fainelli
On 07/20/2017 01:49 AM, Egil Hjelmeland wrote:
> Added read only file /sys/class/net//lan9303/alr_dump,
> that output 168 first ALR entires.
> 
> Currently "bridge fdb show" does not include the CPU port, while
> "alr_dump" list all three ports per entry.

Agreed, and this is a limitation we would probably want to remove in the
future, but duplicating what already exists with "bridge fdb show" into
a sysfs node is a non-starter.
> 
> Example output:
> 
> 9c:57:ad:79:d0:84  1  l
> 01:80:c2:00:00:00 0   s
> 00:13:cb:0d:01:95 0   s
> 10:f3:11:f5:6f:cf   2 l
> 48:4d:7e:f4:59:a8   2 l
> 01:00:5e:00:01:0a 0 2 s
> ec:f4:bb:0f:e2:fd   2 l



> 
> Signed-off-by: Egil Hjelmeland 
> ---
>  Documentation/networking/dsa/lan9303.txt |  3 ++
>  drivers/net/dsa/lan9303-core.c   | 58 
> 
>  2 files changed, 61 insertions(+)
> 
> diff --git a/Documentation/networking/dsa/lan9303.txt 
> b/Documentation/networking/dsa/lan9303.txt
> index 1fd72ff4b492..ace91c821ce7 100644
> --- a/Documentation/networking/dsa/lan9303.txt
> +++ b/Documentation/networking/dsa/lan9303.txt
> @@ -37,6 +37,9 @@ Sysfs nodes
>  When a user port is enabled, the driver creates sysfs directory
>  /sys/class/net/xxx/lan9303 with the following files:
>  
> + - alr_dump (RO): List the 168 first entries of the ALR table.
> +  Including port 0 entires. This file is identical for both ports.
> +  Format: MAC; list of ports; (l)earned / (s)tatic
>   - swe_bcst_throt (RW): Set/get 6.4.7 Broadcast Storm Control
>Throttle Level for the port. Accesses the corresponding bits of
>the SWE_BCST_THROT register (13.4.3.23).
> diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
> index ad7a4c72e1fb..b682aa4f1fca 100644
> --- a/drivers/net/dsa/lan9303-core.c
> +++ b/drivers/net/dsa/lan9303-core.c
> @@ -642,6 +642,47 @@ static void alr_loop_cb_fdb_port_dump(
>   dump_ctx->cb(>obj);
>  }
>  
> +/* /sys/class/net/xxx/lan9303/alr_dump: display 168 first ALR entires,
> + * including cpu port
> + */
> +struct port_sysfs_dump_ctx {
> + char *buf;
> + int pos;
> +};
> +
> +static void alr_loop_cb_sysfs_dump(
> + struct lan9303 *chip, u32 dat0, u32 dat1, int portmap, void *ctx)
> +{
> +#define LINE_LEN 24
> + struct port_sysfs_dump_ctx *dump_ctx = ctx;
> + char *buf = dump_ctx->buf;
> + int  pos =  dump_ctx->pos;
> +
> + u8 mac[ETH_ALEN];
> + int p;
> + char ports[LAN9303_NUM_PORTS + 1];
> + const char trunc_txt[] = "Truncated!\n";
> +
> + if (pos >= PAGE_SIZE - LINE_LEN - (sizeof(trunc_txt) - 1)) {
> + if (pos < PAGE_SIZE - LINE_LEN)
> + pos += sprintf(buf + pos, trunc_txt);
> + dump_ctx->pos = pos;
> + return;
> + }
> +
> + _alr_reg_to_mac(dat0, dat1, mac);
> +
> + /* print ports as list of port numbers: */
> + for (p = 0; p < LAN9303_NUM_PORTS; p++)
> + ports[p] = (portmap & BIT(p)) ? '0' + p : ' ';
> + ports[LAN9303_NUM_PORTS] = 0;
> +
> + pos += sprintf(buf + pos, "%pM %s %s\n",
> +mac, ports,
> +(dat1 & ALR_DAT1_STATIC) ? "s" : "l");
> + dump_ctx->pos = pos;
> +}
> +
>  /* ALR: Add/modify/delete ALR entries */
>  
>  /* Set a static ALR entry. Delete entry if port_map is zero */
> @@ -931,8 +972,25 @@ swe_bcst_throt_store(struct device *dev, struct 
> device_attribute *attr,
>  
>  static DEVICE_ATTR_RW(swe_bcst_throt);
>  
> +static ssize_t
> +alr_dump_show(struct device *dev, struct device_attribute *attr,
> +   char *buf)
> +{
> + struct dsa_port *dp = dsa_net_device_to_dsa_port(to_net_dev(dev));
> + struct lan9303 *chip = dp->ds->priv;
> + struct port_sysfs_dump_ctx dump_ctx = {
> + .buf = buf,
> + .pos = 0,
> + };
> +
> + lan9303_alr_loop(chip, alr_loop_cb_sysfs_dump, _ctx);
> + return dump_ctx.pos;
> +}
> +static DEVICE_ATTR_RO(alr_dump);
> +
>  static struct attribute *lan9303_attrs[] = {
>   _attr_swe_bcst_throt.attr,
> + _attr_alr_dump.attr,
>   NULL
>  };
>  
> 


-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH resend] Documentation: arm: Replace use of virt_to_phys with __pa_symbol

2017-07-18 Thread Florian Fainelli
On 07/17/2017 06:39 AM, Geert Uytterhoeven wrote:
> All low-level PM/SMP code using virt_to_phys() should actually use
> __pa_symbol() against kernel symbols.  Update the documentation to move
> away from virt_to_phys().
> 
> Cfr. commit 6996cbb2372189f7 ("ARM: 8641/1: treewide: Replace uses of
> virt_to_phys with __pa_symbol")
> 
> Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be>

Acked-by: Florian Fainelli <f.faine...@gmail.com>

Sorry for not noticing earlier.

> ---
>  Documentation/arm/firmware.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/arm/firmware.txt b/Documentation/arm/firmware.txt
> index da6713adac8acffc..7f175dbb427e631a 100644
> --- a/Documentation/arm/firmware.txt
> +++ b/Documentation/arm/firmware.txt
> @@ -60,7 +60,7 @@ Example of using a firmware operation:
>  
>   /* some platform code, e.g. SMP initialization */
>  
> - __raw_writel(virt_to_phys(exynos4_secondary_startup),
> + __raw_writel(__pa_symbol(exynos4_secondary_startup),
>   CPU1_BOOT_REG);
>  
>   /* Call Exynos specific smc call */
> 


-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] net: phy: Delete unused function phy_ethtool_gset

2017-06-05 Thread Florian Fainelli
On 06/05/2017 12:18 AM, Yuval Shaia wrote:
> It's unused, so remove it.
> 
> Signed-off-by: Yuval Shaia <yuval.sh...@oracle.com>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] hwmon: (lm70) Add support for TI TMP122/124

2017-01-21 Thread Florian Fainelli
On January 21, 2017 12:25:21 PM PST, Guenter Roeck <li...@roeck-us.net> wrote:
>On 01/21/2017 11:20 AM, Florian Fainelli wrote:
>> Add support for Texas Instruments TMP122/124 which are nearly
>identical to
>> their TMP121/123 except that they also support programmable
>temperature
>> thresholds.
>>
>> Signed-off-by: Florian Fainelli <f.faine...@gmail.com>
>
>Applied to -next.

Thanks was fast, thanks!

>
>Any plans to add support for the thresholds ?

Yes, as mentioned in the cover letter, need to get SPI_3WIRE working with the 
SPI controller (spi-ep93xx) to verify the thresholds do work.

Cheers

-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/2] hwmon: (lm70) Couple patches

2017-01-21 Thread Florian Fainelli
Hi Guenter,

Here are a couple of patches against lm70. I plan on submitting
support for configurable thresholds on TI TMP122/124 once I have
resolved the lack SPI_3WIRE on the controller that connects to
this chip on my board.

Thanks!

Florian Fainelli (2):
  hwmon: (lm70) Utilize dev_warn instead of pr_warn
  hwmon: (lm70) Add support for TI TMP122/124

 Documentation/devicetree/bindings/hwmon/lm70.txt |  1 +
 Documentation/hwmon/lm70 |  8 ++--
 drivers/hwmon/lm70.c | 12 ++--
 3 files changed, 17 insertions(+), 4 deletions(-)

-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn

2017-01-21 Thread Florian Fainelli
We have a device reference, utilize it instead of pr_warn().

Signed-off-by: Florian Fainelli <f.faine...@gmail.com>
---
 drivers/hwmon/lm70.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c
index d6ecd1a4be59..52c5cdd00448 100644
--- a/drivers/hwmon/lm70.c
+++ b/drivers/hwmon/lm70.c
@@ -72,7 +72,8 @@ static ssize_t temp1_input_show(struct device *dev,
 */
status = spi_write_then_read(spi, NULL, 0, [0], 2);
if (status < 0) {
-   pr_warn("spi_write_then_read failed with status %d\n", status);
+   dev_warn(dev, "spi_write_then_read failed with status %d\n",
+status);
goto out;
}
raw = (rxbuf[0] << 8) + rxbuf[1];
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] hwmon: (lm70) Add support for TI TMP122/124

2017-01-21 Thread Florian Fainelli
Add support for Texas Instruments TMP122/124 which are nearly identical to
their TMP121/123 except that they also support programmable temperature
thresholds.

Signed-off-by: Florian Fainelli <f.faine...@gmail.com>
---
 Documentation/devicetree/bindings/hwmon/lm70.txt | 1 +
 Documentation/hwmon/lm70 | 8 ++--
 drivers/hwmon/lm70.c | 9 -
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/lm70.txt 
b/Documentation/devicetree/bindings/hwmon/lm70.txt
index e7fd921aa4f1..ea417a0d32af 100644
--- a/Documentation/devicetree/bindings/hwmon/lm70.txt
+++ b/Documentation/devicetree/bindings/hwmon/lm70.txt
@@ -4,6 +4,7 @@ Required properties:
 - compatible: one of
"ti,lm70"
"ti,tmp121"
+   "ti,tmp122"
"ti,lm71"
"ti,lm74"
 
diff --git a/Documentation/hwmon/lm70 b/Documentation/hwmon/lm70
index 1bb2db440671..c3a1f2ea017d 100644
--- a/Documentation/hwmon/lm70
+++ b/Documentation/hwmon/lm70
@@ -6,6 +6,8 @@ Supported chips:
 Datasheet: http://www.national.com/pf/LM/LM70.html
   * Texas Instruments TMP121/TMP123
 Information: http://focus.ti.com/docs/prod/folders/print/tmp121.html
+  * Texas Instruments TMP122/TMP124
+Information: http://www.ti.com/product/tmp122
   * National Semiconductor LM71
 Datasheet: http://www.ti.com/product/LM71
   * National Semiconductor LM74
@@ -35,8 +37,10 @@ As a real (in-tree) example of this "SPI protocol driver" 
interfacing
 with a "SPI master controller driver", see drivers/spi/spi_lm70llp.c
 and its associated documentation.
 
-The LM74 and TMP121/TMP123 are very similar; main difference is 13-bit
-temperature data (0.0625 degrees celsius resolution).
+The LM74 and TMP121/TMP122/TMP123/TMP124 are very similar; main difference is
+13-bit temperature data (0.0625 degrees celsius resolution).
+
+The TMP122/TMP124 also feature configurable temperature thresholds.
 
 The LM71 is also very similar; main difference is 14-bit temperature
 data (0.03125 degrees celsius resolution).
diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c
index 52c5cdd00448..543556dc563b 100644
--- a/drivers/hwmon/lm70.c
+++ b/drivers/hwmon/lm70.c
@@ -46,6 +46,7 @@
 #define LM70_CHIP_TMP121   1   /* TI TMP121/TMP123 */
 #define LM70_CHIP_LM71 2   /* NS LM71 */
 #define LM70_CHIP_LM74 3   /* NS LM74 */
+#define LM70_CHIP_TMP122   4   /* TI TMP122/TMP124 */
 
 struct lm70 {
struct spi_device *spi;
@@ -92,7 +93,7 @@ static ssize_t temp1_input_show(struct device *dev,
 * Celsius.
 * So it's equivalent to multiplying by 0.25 * 1000 = 250.
 *
-* LM74 and TMP121/TMP123:
+* LM74 and TMP121/TMP122/TMP123/TMP124:
 * 13 bits of 2's complement data, discard LSB 3 bits,
 * resolution 0.0625 degrees celsius.
 *
@@ -106,6 +107,7 @@ static ssize_t temp1_input_show(struct device *dev,
break;
 
case LM70_CHIP_TMP121:
+   case LM70_CHIP_TMP122:
case LM70_CHIP_LM74:
val = ((int)raw / 8) * 625 / 10;
break;
@@ -143,6 +145,10 @@ static const struct of_device_id lm70_of_ids[] = {
.data = (void *) LM70_CHIP_TMP121,
},
{
+   .compatible = "ti,tmp122",
+   .data = (void *) LM70_CHIP_TMP122,
+   },
+   {
.compatible = "ti,lm71",
.data = (void *) LM70_CHIP_LM71,
},
@@ -191,6 +197,7 @@ static int lm70_probe(struct spi_device *spi)
 static const struct spi_device_id lm70_ids[] = {
{ "lm70",   LM70_CHIP_LM70 },
{ "tmp121", LM70_CHIP_TMP121 },
+   { "tmp122", LM70_CHIP_TMP122 },
{ "lm71",   LM70_CHIP_LM71 },
{ "lm74",   LM70_CHIP_LM74 },
{ },
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Documentation: dontdiff: Update with additional entries

2017-01-16 Thread Florian Fainelli
Add a bunch of entries reflective of programs that the kernel build:
sortextable, dtc. And while at it, expand the lex*.c entries to cover
e.g: dtc-lexer.c. Finally, exclude devicetable-offsets.h

Signed-off-by: Florian Fainelli <f.faine...@gmail.com>
---
 Documentation/dontdiff | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index a23edccd2059..77b92221f951 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -116,9 +116,11 @@ crc32table.h*
 cscope.*
 defkeymap.c
 devlist.h*
+devicetable-offsets.h
 dnotify_test
 docproc
 dslm
+dtc
 elf2ecoff
 elfconfig.h*
 evergreen_reg_safe.h
@@ -153,8 +155,8 @@ keywords.c
 ksym.c*
 ksym.h*
 kxgettext
-lex.c
-lex.*.c
+*lex.c
+*lex.*.c
 linux
 logo_*.c
 logo_*_clut224.c
@@ -215,6 +217,7 @@ series
 setup
 setup.bin
 setup.elf
+sortextable
 sImage
 sm_tbl*
 split-include
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Documentation: networking: dsa: Update tagging protocols

2016-11-04 Thread Florian Fainelli


On 11/04/2016 05:16 AM, Fabian Mewes wrote:
> Add Qualcomm QCA tagging introduced in cafdc45c9 to the
> list of supported protocols.
> 
> Signed-off-by: Fabian Mewes <archit...@coding4coffee.org>

Acked-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html