Lines Matching +full:unit +full:- +full:addresses

1 // SPDX-License-Identifier: GPL-2.0-or-later
30 int addr = phy; /* PHY devices addresses start at 0x0 */ in mv88e6xxx_phy_read()
35 return -EOPNOTSUPP; in mv88e6xxx_phy_read()
37 if (!chip->info->ops->phy_read) in mv88e6xxx_phy_read()
38 return -EOPNOTSUPP; in mv88e6xxx_phy_read()
40 return chip->info->ops->phy_read(chip, bus, addr, reg, val); in mv88e6xxx_phy_read()
45 int addr = phy; /* PHY devices addresses start at 0x0 */ in mv88e6xxx_phy_write()
50 return -EOPNOTSUPP; in mv88e6xxx_phy_write()
52 if (!chip->info->ops->phy_write) in mv88e6xxx_phy_write()
53 return -EOPNOTSUPP; in mv88e6xxx_phy_write()
55 return chip->info->ops->phy_write(chip, bus, addr, reg, val); in mv88e6xxx_phy_write()
73 dev_err(chip->dev, in mv88e6xxx_phy_page_put()
86 return -EINVAL; in mv88e6xxx_phy_page_read()
104 return -EINVAL; in mv88e6xxx_phy_page_write()
120 if (!chip->info->ops->ppu_disable) in mv88e6xxx_phy_ppu_disable()
123 return chip->info->ops->ppu_disable(chip); in mv88e6xxx_phy_ppu_disable()
128 if (!chip->info->ops->ppu_enable) in mv88e6xxx_phy_ppu_enable()
131 return chip->info->ops->ppu_enable(chip); in mv88e6xxx_phy_ppu_enable()
142 if (mutex_trylock(&chip->ppu_mutex)) { in mv88e6xxx_phy_ppu_reenable_work()
144 chip->ppu_disabled = 0; in mv88e6xxx_phy_ppu_reenable_work()
145 mutex_unlock(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_reenable_work()
155 schedule_work(&chip->ppu_work); in mv88e6xxx_phy_ppu_reenable_timer()
162 mutex_lock(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_access_get()
164 /* If the PHY polling unit is enabled, disable it so that in mv88e6xxx_phy_ppu_access_get()
166 * disabled, cancel the timer that is going to re-enable in mv88e6xxx_phy_ppu_access_get()
169 if (!chip->ppu_disabled) { in mv88e6xxx_phy_ppu_access_get()
172 mutex_unlock(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_access_get()
175 chip->ppu_disabled = 1; in mv88e6xxx_phy_ppu_access_get()
177 del_timer(&chip->ppu_timer); in mv88e6xxx_phy_ppu_access_get()
186 /* Schedule a timer to re-enable the PHY polling unit. */ in mv88e6xxx_phy_ppu_access_put()
187 mod_timer(&chip->ppu_timer, jiffies + msecs_to_jiffies(10)); in mv88e6xxx_phy_ppu_access_put()
188 mutex_unlock(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_access_put()
193 mutex_init(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_state_init()
194 INIT_WORK(&chip->ppu_work, mv88e6xxx_phy_ppu_reenable_work); in mv88e6xxx_phy_ppu_state_init()
195 timer_setup(&chip->ppu_timer, mv88e6xxx_phy_ppu_reenable_timer, 0); in mv88e6xxx_phy_ppu_state_init()
200 del_timer_sync(&chip->ppu_timer); in mv88e6xxx_phy_ppu_state_destroy()
233 if (chip->info->ops->ppu_enable && chip->info->ops->ppu_disable) in mv88e6xxx_phy_init()
239 if (chip->info->ops->ppu_enable && chip->info->ops->ppu_disable) in mv88e6xxx_phy_destroy()