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()
61 int addr = phy; /* PHY devices addresses start at 0x0 */ in mv88e6xxx_phy_read_c45()
66 return -EOPNOTSUPP; in mv88e6xxx_phy_read_c45()
68 if (!chip->info->ops->phy_read_c45) in mv88e6xxx_phy_read_c45()
69 return -EOPNOTSUPP; in mv88e6xxx_phy_read_c45()
71 return chip->info->ops->phy_read_c45(chip, bus, addr, devad, reg, val); in mv88e6xxx_phy_read_c45()
77 int addr = phy; /* PHY devices addresses start at 0x0 */ in mv88e6xxx_phy_write_c45()
82 return -EOPNOTSUPP; in mv88e6xxx_phy_write_c45()
84 if (!chip->info->ops->phy_write_c45) in mv88e6xxx_phy_write_c45()
85 return -EOPNOTSUPP; in mv88e6xxx_phy_write_c45()
87 return chip->info->ops->phy_write_c45(chip, bus, addr, devad, reg, val); in mv88e6xxx_phy_write_c45()
105 dev_err(chip->dev, in mv88e6xxx_phy_page_put()
118 return -EINVAL; in mv88e6xxx_phy_page_read()
136 return -EINVAL; in mv88e6xxx_phy_page_write()
152 if (!chip->info->ops->ppu_disable) in mv88e6xxx_phy_ppu_disable()
155 return chip->info->ops->ppu_disable(chip); in mv88e6xxx_phy_ppu_disable()
160 if (!chip->info->ops->ppu_enable) in mv88e6xxx_phy_ppu_enable()
163 return chip->info->ops->ppu_enable(chip); in mv88e6xxx_phy_ppu_enable()
174 if (mutex_trylock(&chip->ppu_mutex)) { in mv88e6xxx_phy_ppu_reenable_work()
176 chip->ppu_disabled = 0; in mv88e6xxx_phy_ppu_reenable_work()
177 mutex_unlock(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_reenable_work()
187 schedule_work(&chip->ppu_work); in mv88e6xxx_phy_ppu_reenable_timer()
194 mutex_lock(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_access_get()
196 /* If the PHY polling unit is enabled, disable it so that in mv88e6xxx_phy_ppu_access_get()
198 * disabled, cancel the timer that is going to re-enable in mv88e6xxx_phy_ppu_access_get()
201 if (!chip->ppu_disabled) { in mv88e6xxx_phy_ppu_access_get()
204 mutex_unlock(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_access_get()
207 chip->ppu_disabled = 1; in mv88e6xxx_phy_ppu_access_get()
209 del_timer(&chip->ppu_timer); in mv88e6xxx_phy_ppu_access_get()
218 /* Schedule a timer to re-enable the PHY polling unit. */ in mv88e6xxx_phy_ppu_access_put()
219 mod_timer(&chip->ppu_timer, jiffies + msecs_to_jiffies(10)); in mv88e6xxx_phy_ppu_access_put()
220 mutex_unlock(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_access_put()
225 mutex_init(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_state_init()
226 INIT_WORK(&chip->ppu_work, mv88e6xxx_phy_ppu_reenable_work); in mv88e6xxx_phy_ppu_state_init()
227 timer_setup(&chip->ppu_timer, mv88e6xxx_phy_ppu_reenable_timer, 0); in mv88e6xxx_phy_ppu_state_init()
232 mutex_lock(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_state_destroy()
233 del_timer_sync(&chip->ppu_timer); in mv88e6xxx_phy_ppu_state_destroy()
234 cancel_work_sync(&chip->ppu_work); in mv88e6xxx_phy_ppu_state_destroy()
235 mutex_unlock(&chip->ppu_mutex); in mv88e6xxx_phy_ppu_state_destroy()
268 if (chip->info->ops->ppu_enable && chip->info->ops->ppu_disable) in mv88e6xxx_phy_init()
274 if (chip->info->ops->ppu_enable && chip->info->ops->ppu_disable) in mv88e6xxx_phy_destroy()