Re: [PATCH net-next v3 06/12] net: dsa: microchip: ksz9477: basic interrupt support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 18, 2020 at 09:30:07PM +0100, Christian Eggers wrote:
> Interrupts are required for TX time stamping. Probably they could also
> be used for PHY connection status.
> 
> This patch only adds the basic infrastructure for interrupts, no
> interrupts are finally enabled nor handled.
> 
> Signed-off-by: Christian Eggers <ceggers@xxxxxxx>
> ---

Reviewed-by: Vladimir Oltean <olteanv@xxxxxxxxx>

> +static int ksz9477_enable_port_interrupts(struct ksz_device *dev, bool enable)
> +{
> +	u32 data, mask = GENMASK(dev->port_cnt - 1, 0);
> +	int ret;
> +
> +	ret = ksz_read32(dev, REG_SW_PORT_INT_MASK__4, &data);
> +	if (ret)
> +		return ret;
> +
> +	/* bits in REG_SW_PORT_INT_MASK__4 are low active */

s/low active/active low/

> +	if (enable)
> +		data &= ~mask;
> +	else
> +		data |= mask;
> +
> +	return ksz_write32(dev, REG_SW_PORT_INT_MASK__4, data);
> +}



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux