Definitely. When I go out with treats for my chickens, I whistle. if I want them to come in, all I have to do is whistle. And I make sure there are treats for when they come.
The only "punishment" and I use the term loosely as nothing happens is if they are in the flower bed scratching...